Menu

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-Keystringrequired

8–255 characters

Request body

By contact id
5 child attributes
contactIdstringrequired

Kirora's id for the contact.

uuid

eventNamestringrequired

Case-sensitive, up to 128 characters; contact.* is reserved.

1–128 characters

propertiesobjectoptional

Free-form details of the event; at most 16 KB, keys up to 64 characters.

default {}

occurredAtstringoptional

When it happened; defaults to now. At most 24 hours ahead.

date-time

contextEventContextInputoptional

Where and on what it happened, beside the properties.

9 child attributes
sessionIdstringoptional

The visit, from the SDK.

up to 128 characters

localestringoptional

As BCP 47, en-GB.

up to 35 characters

timezonestringoptional

As IANA, Europe/Berlin.

up to 64 characters

pageobjectoptional

Web: the page, without its query string or fragment.

4 child attributes
urlstringoptional

up to 2048 characters

pathstringoptional

up to 2048 characters

titlestringoptional

up to 256 characters

referrerstringoptional

up to 2048 characters

campaignobjectoptional

Web: the utm_* parameters of the page.

5 child attributes
sourcestringoptional

up to 256 characters

mediumstringoptional

up to 256 characters

namestringoptional

up to 256 characters

termstringoptional

up to 256 characters

contentstringoptional

up to 256 characters

deviceobjectoptional
1 child attribute
idstringoptional

A random id the SDK keeps on the device; never a hardware id.

up to 128 characters

libraryobjectoptional
2 child attributes
namestringoptional

up to 64 characters

versionstringoptional

up to 64 characters

ipstringoptional

up to 64 characters

userAgentstringoptional

up to 1024 characters

By external id
5 child attributes
externalIdstringrequired

Your own id for the contact, as set with identify.

1–255 characters

eventNamestringrequired

Case-sensitive, up to 128 characters; contact.* is reserved.

1–128 characters

propertiesobjectoptional

Free-form details of the event; at most 16 KB, keys up to 64 characters.

default {}

occurredAtstringoptional

When it happened; defaults to now. At most 24 hours ahead.

date-time

contextEventContextInputoptional

Where and on what it happened, beside the properties.

9 child attributes
sessionIdstringoptional

The visit, from the SDK.

up to 128 characters

localestringoptional

As BCP 47, en-GB.

up to 35 characters

timezonestringoptional

As IANA, Europe/Berlin.

up to 64 characters

pageobjectoptional

Web: the page, without its query string or fragment.

4 child attributes
urlstringoptional

up to 2048 characters

pathstringoptional

up to 2048 characters

titlestringoptional

up to 256 characters

referrerstringoptional

up to 2048 characters

campaignobjectoptional

Web: the utm_* parameters of the page.

5 child attributes
sourcestringoptional

up to 256 characters

mediumstringoptional

up to 256 characters

namestringoptional

up to 256 characters

termstringoptional

up to 256 characters

contentstringoptional

up to 256 characters

deviceobjectoptional
1 child attribute
idstringoptional

A random id the SDK keeps on the device; never a hardware id.

up to 128 characters

libraryobjectoptional
2 child attributes
namestringoptional

up to 64 characters

versionstringoptional

up to 64 characters

ipstringoptional

up to 64 characters

userAgentstringoptional

up to 1024 characters

By email
5 child attributes
emailstringrequired

The contact's email address, matched trimmed and without case.

eventNamestringrequired

Case-sensitive, up to 128 characters; contact.* is reserved.

1–128 characters

propertiesobjectoptional

Free-form details of the event; at most 16 KB, keys up to 64 characters.

default {}

occurredAtstringoptional

When it happened; defaults to now. At most 24 hours ahead.

date-time

contextEventContextInputoptional

Where and on what it happened, beside the properties.

9 child attributes
sessionIdstringoptional

The visit, from the SDK.

up to 128 characters

localestringoptional

As BCP 47, en-GB.

up to 35 characters

timezonestringoptional

As IANA, Europe/Berlin.

up to 64 characters

pageobjectoptional

Web: the page, without its query string or fragment.

4 child attributes
urlstringoptional

up to 2048 characters

pathstringoptional

up to 2048 characters

titlestringoptional

up to 256 characters

referrerstringoptional

up to 2048 characters

campaignobjectoptional

Web: the utm_* parameters of the page.

5 child attributes
sourcestringoptional

up to 256 characters

mediumstringoptional

up to 256 characters

namestringoptional

up to 256 characters

termstringoptional

up to 256 characters

contentstringoptional

up to 256 characters

deviceobjectoptional
1 child attribute
idstringoptional

A random id the SDK keeps on the device; never a hardware id.

up to 128 characters

libraryobjectoptional
2 child attributes
namestringoptional

up to 64 characters

versionstringoptional

up to 64 characters

ipstringoptional

up to 64 characters

userAgentstringoptional

up to 1024 characters

Returns

Returns 201 Created with a TrackedEvent in data. Otherwise returns an error; Errors lists every code and which to retry.

idstringrequired

uuid

occurredAtstringrequired

date-time