Base URL and Authentication
All API requests go to the following base URL. Every request must include anAuthorization header with your API key as a Bearer token and a Content-Type of application/json.
Track an Event
Send aPOST request to /events with an event name, a user identifier, and any properties you want to capture.
track-event.sh
201 Created):
Identify a User
Send aPOST to /identify to associate a user ID with a set of traits. Call this after a user signs up or logs in so that all future events from that ID are enriched with their profile data.
identify-user.sh
200 OK):
Batch Events
To reduce HTTP round-trips, send multiple events in a single request by posting an array to/events/batch. You can include up to 500 events per batch.
batch-events.sh
200 OK):
Pagination
Endpoints that return lists of records (such asGET /events) use cursor-based pagination. Each response includes a next_cursor field — pass its value as the cursor query parameter to fetch the next page. When next_cursor is null, you have reached the last page.
pagination.sh
Cursors are opaque, base64-encoded strings. Do not attempt to decode or construct them manually — always use the
next_cursor value returned by the previous response.Error Handling
The API returns standard HTTP status codes. All error responses include a JSON body with a machine-readableerror_code and a human-readable message.
For
429 responses, the API includes a Retry-After header with the number of seconds to wait before retrying: