Each entry takes its own idempotencyKey, so retrying the whole batch never acts twice on an entry that already went through. About idempotency
Up to 100 events in one request, each stored exactly as POST /v1/events/track would, in order, under its own idempotencyKey in place of the header. One event refused does not stop the rest: its entry carries the error a single track would have answered, and a key already used answers the stored event with replayed: true. Retry a failed batch whole; the keys stop anything being stored twice. Counts against the rate limit as one request per event.
Request body
eventsobject[]required
at least 1 item · at most 100 items
2 child attributes
idempotencyKeystringrequired
As the Idempotency-Key header of a single track: one per event you mean.
8–255 characters
eventobjectrequired
One of 3 shapes
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.
campaignobjectoptional
Web: the utm_* parameters of the page.
deviceobjectoptional
libraryobjectoptional
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.
campaignobjectoptional
Web: the utm_* parameters of the page.
deviceobjectoptional
libraryobjectoptional
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.
campaignobjectoptional
Web: the utm_* parameters of the page.
deviceobjectoptional
libraryobjectoptional
ipstringoptional
up to 64 characters
userAgentstringoptional
up to 1024 characters
Returns
Returns 200 OK with a TrackEventsResult in data. Otherwise returns an error; Errors lists every code and which to retry.
resultsobject[]required
One of 2 shapes
Event recorded
3 child attributes
idempotencyKeystringrequired
replayedbooleanrequired
True when the key was used before and the stored event is returned.