POST
/v1/events/batchSend events in bulk
Accepts up to 500 events in one request and returns per-record ingestion status.
Authentication
Requires Authorization: Bearer ${API_KEY}. Create and rotate keys from the TrackLayer dashboard.
Request body schema
{
"events": [
{
"event_name": "string",
"user_id": "string",
"properties": "object"
}
]
}Response schema · 202
{
"batch_id": "batch_123",
"accepted": 500,
"rejected": 0
}Response example
{
"batch_id": "batch_123",
"accepted": 500,
"rejected": 0
}Code examples
curl https://api.tracklayer.com/v1/events/batch \
-X POST \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{"events":[{"event_name":"purchase","user_id":"u_123","properties":{"order_id":"100045","value":129}}]}'Try it out
Use the dashboard to create an API key, then run one of the examples above with TRACKLAYER_API_KEY set in your environment.