v1

latestOpenAPI 3.1.02026-07-244010.8 KB

Track

Use this API to send custom events to Heap server-side. We recommend using this for events that need to exactly match your backend, such as completed order transaction info, or events that are not available for Heap to capture on the client-side.<br><br>NOTE: It is required that you use either the identity or user_id param, but not both.

post/api/track

Request body

app_idstring required

The environment ID corresponding to one of your environments.

eventstring required

The name of the server-side event. Limited to 1024 characters.

identitystring

An identity, typically corresponding to an existing user. If no such identity exists, then a new user will be created with that identity. Case-sensitive string, limited to 255 characters.

user_idstring

The user_id from the Heap SDK. The user_id must be the string representation of a number between zero and 2^53 - 1. user_id may be specified instead of identity, but both cannot be provided at the same time.

session_idstring

An identifier corresponding to a user's session

timestampstring

ISO8601 e.g. "2017-03-10T22:21:56+00:00". Defaults to the current time if not provided.

idempotency_keystring

A unique ID that will be hashed to Heap's event ID keyspace, to prevent duplication of events. Subsequent calls with the same idempotency key will not update data.

Response

200

object required
All 4 operations