Events
Track an event
POST/v1/events/track
Requires an API key with the events:write scope. About keys and scopes
Takes an Idempotency-Key header: a retry with the same key returns the first result instead of acting twice. Derive the key from what you are sending, and reuse it on every retry. About idempotency
Records a behavioural event against a contact. Events drive journey triggers and segment rules, so this is the main ingestion endpoint for product activity. The event and its processing obligation are stored atomically: a 201 confirms storage, while journey and conversion effects run asynchronously afterwards. Name the contact by exactly one of contactId, externalId or email; a contact that does not exist is a 404, never created. occurredAt may be at most 24 hours in the future. Names are case-sensitive, up to 128 characters with no control characters; those beginning with contact. are reserved for platform events. A workspace tracks at most 1,000 distinct names: a new one past that is refused with EVENT_NAME_LIMIT_REACHED, so keep ids and prices in properties. A repeated Idempotency-Key answers the event first stored, with Idempotency-Replay: true.
Header parameters
Idempotency-Keystringrequired8–255 characters
Request body
- By contact id
5 child attributes
contactIdstringrequiredKirora's id for the contact.
uuid
eventNamestringrequiredCase-sensitive, up to 128 characters;
contact.*is reserved.1–128 characters
propertiesobjectoptionalFree-form details of the event; at most 16 KB, keys up to 64 characters.
default
{}occurredAtstringoptionalWhen it happened; defaults to now. At most 24 hours ahead.
date-time
contextEventContextInputoptionalWhere and on what it happened, beside the properties.
9 child attributes
sessionIdstringoptionalThe visit, from the SDK.
up to 128 characters
localestringoptionalAs BCP 47,
en-GB.up to 35 characters
timezonestringoptionalAs IANA,
Europe/Berlin.up to 64 characters
pageobjectoptionalWeb: the page, without its query string or fragment.
4 child attributes
urlstringoptionalup to 2048 characters
pathstringoptionalup to 2048 characters
titlestringoptionalup to 256 characters
referrerstringoptionalup to 2048 characters
campaignobjectoptionalWeb: the
utm_*parameters of the page.5 child attributes
sourcestringoptionalup to 256 characters
mediumstringoptionalup to 256 characters
namestringoptionalup to 256 characters
termstringoptionalup to 256 characters
contentstringoptionalup to 256 characters
deviceobjectoptional1 child attribute
idstringoptionalA random id the SDK keeps on the device; never a hardware id.
up to 128 characters
libraryobjectoptional2 child attributes
namestringoptionalup to 64 characters
versionstringoptionalup to 64 characters
ipstringoptionalup to 64 characters
userAgentstringoptionalup to 1024 characters
- By external id
5 child attributes
externalIdstringrequiredYour own id for the contact, as set with identify.
1–255 characters
eventNamestringrequiredCase-sensitive, up to 128 characters;
contact.*is reserved.1–128 characters
propertiesobjectoptionalFree-form details of the event; at most 16 KB, keys up to 64 characters.
default
{}occurredAtstringoptionalWhen it happened; defaults to now. At most 24 hours ahead.
date-time
contextEventContextInputoptionalWhere and on what it happened, beside the properties.
9 child attributes
sessionIdstringoptionalThe visit, from the SDK.
up to 128 characters
localestringoptionalAs BCP 47,
en-GB.up to 35 characters
timezonestringoptionalAs IANA,
Europe/Berlin.up to 64 characters
pageobjectoptionalWeb: the page, without its query string or fragment.
4 child attributes
urlstringoptionalup to 2048 characters
pathstringoptionalup to 2048 characters
titlestringoptionalup to 256 characters
referrerstringoptionalup to 2048 characters
campaignobjectoptionalWeb: the
utm_*parameters of the page.5 child attributes
sourcestringoptionalup to 256 characters
mediumstringoptionalup to 256 characters
namestringoptionalup to 256 characters
termstringoptionalup to 256 characters
contentstringoptionalup to 256 characters
deviceobjectoptional1 child attribute
idstringoptionalA random id the SDK keeps on the device; never a hardware id.
up to 128 characters
libraryobjectoptional2 child attributes
namestringoptionalup to 64 characters
versionstringoptionalup to 64 characters
ipstringoptionalup to 64 characters
userAgentstringoptionalup to 1024 characters
- By email
5 child attributes
emailstringrequiredThe contact's email address, matched trimmed and without case.
eventNamestringrequiredCase-sensitive, up to 128 characters;
contact.*is reserved.1–128 characters
propertiesobjectoptionalFree-form details of the event; at most 16 KB, keys up to 64 characters.
default
{}occurredAtstringoptionalWhen it happened; defaults to now. At most 24 hours ahead.
date-time
contextEventContextInputoptionalWhere and on what it happened, beside the properties.
9 child attributes
sessionIdstringoptionalThe visit, from the SDK.
up to 128 characters
localestringoptionalAs BCP 47,
en-GB.up to 35 characters
timezonestringoptionalAs IANA,
Europe/Berlin.up to 64 characters
pageobjectoptionalWeb: the page, without its query string or fragment.
4 child attributes
urlstringoptionalup to 2048 characters
pathstringoptionalup to 2048 characters
titlestringoptionalup to 256 characters
referrerstringoptionalup to 2048 characters
campaignobjectoptionalWeb: the
utm_*parameters of the page.5 child attributes
sourcestringoptionalup to 256 characters
mediumstringoptionalup to 256 characters
namestringoptionalup to 256 characters
termstringoptionalup to 256 characters
contentstringoptionalup to 256 characters
deviceobjectoptional1 child attribute
idstringoptionalA random id the SDK keeps on the device; never a hardware id.
up to 128 characters
libraryobjectoptional2 child attributes
namestringoptionalup to 64 characters
versionstringoptionalup to 64 characters
ipstringoptionalup to 64 characters
userAgentstringoptionalup to 1024 characters
Returns
Returns 201 Created with a TrackedEvent in data. Otherwise returns an error; Errors lists every code and which to retry.
idstringrequireduuid
occurredAtstringrequireddate-time