GET
/
v1
/
event-definitions
# List event definitions with pagination
curl https://api.usertour.io/v1/event-definitions?limit=4&orderBy=createdAt \
-H 'Authorization: Bearer ak_123456789' \
-H 'Content-Type: application/json'
{
  "results": [
    {
      "id": "cm9e922p3001pmjao5vba8054",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Started",
      "codeName": "flow_started"
    },
    {
      "id": "cm9e922p3001qmjaozg69mzk9",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Dismissed/Ended",
      "codeName": "flow_ended"
    },
    {
      "id": "cm9e922p3001rmjaom1h20luk",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Step Seen",
      "codeName": "flow_step_seen"
    },
    {
      "id": "cm9e922p4001smjaov92o3zq8",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Step Completed",
      "codeName": "flow_step_completed"
    }
  ],
  "next": "/v1/event-definitions?limit=4&orderBy=createdAt&cursor=cm9e922p4001smjaov92o3zq8",
  "previous": null
}

This endpoint returns a paginated list of event definitions. Each definition contains its display name, code name, and creation timestamp.

Query parameters

orderBy
string | string[]

Sort the results by one or more fields. Available fields:

  • createdAt: Creation timestamp
  • codeName: Technical name
  • displayName: Display name

Examples:

  • Single field: orderBy=createdAt or orderBy=-createdAt (descending)
  • Multiple fields: orderBy[]=-createdAt&orderBy[]=displayName
limit
number
default:"20"

Specifies the maximum number of items to return in a single response. The value must be between 1 and 100. If not specified, defaults to 20 items per page.

cursor
string

Specifies the starting point for the next page of results. The response will include items that come after (but not including) the object with this ID. To get the next page, use the ID of the last item from your previous request. The easiest way is to use the list object’s cursor field. If not provided, the API will return items from the beginning of the list.

Response

Returns a list object containing an array of event definition objects in the results property. The response includes pagination information in the next and previous fields.

# List event definitions with pagination
curl https://api.usertour.io/v1/event-definitions?limit=4&orderBy=createdAt \
-H 'Authorization: Bearer ak_123456789' \
-H 'Content-Type: application/json'
{
  "results": [
    {
      "id": "cm9e922p3001pmjao5vba8054",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Started",
      "codeName": "flow_started"
    },
    {
      "id": "cm9e922p3001qmjaozg69mzk9",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Dismissed/Ended",
      "codeName": "flow_ended"
    },
    {
      "id": "cm9e922p3001rmjaom1h20luk",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Step Seen",
      "codeName": "flow_step_seen"
    },
    {
      "id": "cm9e922p4001smjaov92o3zq8",
      "object": "eventDefinition",
      "createdAt": "2025-04-12T13:26:30.952Z",
      "description": "",
      "displayName": "Flow Step Completed",
      "codeName": "flow_step_completed"
    }
  ],
  "next": "/v1/event-definitions?limit=4&orderBy=createdAt&cursor=cm9e922p4001smjaov92o3zq8",
  "previous": null
}