Track Event
Record a customer event for a project. Requires the audience:write permission. Contact resolution is consent safe: profile fields may update, subscription status never changes. Send an Idempotency-Key header (or a body dedupeKey) for replay safety; without either, every call stores a distinct event. Events carrying identifiers.externalOrderId and a numeric properties.value are recorded as conversions attributed to the last email the contact clicked within five days.
Authorizations
API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → Developers → API Keys.
Headers
Replay-safe key. Takes precedence over the body dedupeKey.
200Body
Event name, e.g. purchase.completed. Names containing refund or cancelled record negative conversion amounts.
120Contact identity for the event. At least one of email or subscriberId is required. Provider ids (externalCustomerId, externalCheckoutId, externalOrderId) support integrations and conversion attribution.
8040Contact metadata to update. Profile updates never change subscription status, tags, or consent. Events never opt a contact in.
Event facts. Up to 16KB, 50 top-level keys, 4 levels deep. A numeric value (major units, e.g. 49.99) together with identifiers.externalOrderId records a conversion; currency is an ISO code, default USD.
When the event happened. Defaults to receipt time.
Event-identity dedupe key. Replaying the same key stores nothing and returns the original eventId.
200