Skip to Content
AccoilAccoil Developer Docs

Track

Record a user event. Only the event name is accepted -- no properties.

The track call records a user event in Accoil. Only the event name is accepted -- Accoil does not support custom event properties. Event names should describe the action the user performed, such as Feature Activated or Report Exported.

Looking for the legacy v1 endpoint? See POST /v1/events.

POST
/v2/track

Authorization

V2BasicApiKey
headerAuthorization<token>

Use format "Basic API_KEY" where API_KEY is your unique Accoil API key. Found under Account > General settings.

Request Body

User event tracking

application/json
  1. body
timestamp?string

ISO 8601 Formatted date string. Will default to UTC now if not supplied.

Formatdate-time
userId*string

A unique identifier for the user performing the event.

event*string

The name of the event being tracked.

  • Use a consistent Noun-Verb format for event names (e.g., "Report_Created").

Response Body

Accepted

Example Request
curl -X POST 'https://in.accoil.com/v2/track' \  -H 'Content-Type: application/json' \  -d '{  "userId": "user_12345",  "event": "Report_Created"}'
Example Response
Empty