Queue up to 500 events
Events are validated as a whole and accepted or refused as a whole. 202 means the whole batch is durably accepted (fsynced to the api's ingest log) and will reach analytics within about a second while ClickHouse is up; it does not mean the events are already queryable. 503 with Retry-After means nothing was accepted; retry the same batch. Items whose message_id was already accepted are answered as accepted and not stored again, so resending a batch is safe. All events of one batch belong to the user named by X-User-Id. Batching is the cheap path: one request for many events.
Authorization
projectKey Public write key. Safe to embed in client applications; grants ingest only. Paired with X-Project-Secret it also grants read-only programmatic access.
In: header
Header Parameters
Who the event belongs to: your user id, or a per-visitor anonymous id you keep (the SDKs generate one). Same namespace as identify's custom_id. Omit only when a shared, address-derived profile is acceptable.
1 <= length <= 256Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/events/batch" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "created_at": "2026-09-13T12:30:45Z", "name": "screen_view", "properties": { "screen": "home" }, "type": "track" }, { "created_at": "2026-09-13T12:30:47Z", "name": "button_tap", "properties": { "button": "buy" }, "type": "track" } ] }'{ "status": "queued", "user_uuid": "00000000-0000-0000-8b20-15635fadf462"}