Skip to main content
The Events API is the core of Cano Analytics — it lets you ingest events from your servers and query the full event stream by user, event name, or time window. All requests require a valid API key sent as a Bearer token in the Authorization header.

POST /v1/events — Track an Event

Send a single event to Cano Analytics. This endpoint requires the write scope.

Request headers

Body parameters

string
required
The name of the event in snake_case format (e.g. page_viewed, order_completed).
string
The unique identifier for the authenticated user. Either user_id or anonymous_id must be present.
string
A unique identifier for an anonymous user (e.g. a cookie or device ID). Required when user_id is not provided.
object
A free-form key-value object containing additional metadata about the event (e.g. { "plan": "pro", "amount": 49.00 }).
string
An ISO 8601 timestamp indicating when the event occurred. Defaults to the server’s current time if omitted.

Request example

POST /v1/events

Response — 200 OK

string
The unique ID assigned to this event by Cano Analytics.
string
Always "received" for a successful ingest.
string
ISO 8601 timestamp recording when Cano Analytics received the event.
200 OK

Error responses


POST /v1/events/batch — Batch Track Events

Send up to 1,000 events in a single HTTP request to reduce network overhead. The batch endpoint accepts the same event shape as the single-event endpoint, wrapped in an events array.

Body parameters

array
required
An array of event objects. Each object follows the same schema as the single POST /v1/events body. Maximum 1,000 items per request.

Request example

POST /v1/events/batch

Response — 200 OK

200 OK
If some events in the batch are invalid, Cano Analytics still ingests the valid ones and reports the count of failures. Inspect the optional errors array in the response for details on which items failed.

GET /v1/events — List Events

Query your event stream with optional filters. This endpoint requires the read scope and returns results in reverse-chronological order with cursor-based pagination.

Query parameters

string
Filter results to a specific event name (e.g. event=order_completed).
string
Filter results to events belonging to a specific user.
string
ISO 8601 timestamp. Return only events that occurred at or after this time.
string
ISO 8601 timestamp. Return only events that occurred at or before this time.
integer
Number of events to return. Defaults to 100. Maximum is 1000.
string
Opaque pagination cursor returned in the previous response’s next_cursor field. Pass this to retrieve the next page.

Request example

cURL

Response fields

array
An array of event objects matching your query filters, each containing id, event, user_id, properties, and timestamp.
string
An opaque string to pass as cursor in your next request to retrieve the following page. null when no more pages exist.
boolean
true if additional pages of results are available beyond the current response.
200 OK