> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertour.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List event definitions

> Retrieves a paginated list of event definitions in your account. Each definition includes its name, code, and metadata.

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

## Query parameters

<ParamField path="orderBy" type="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`
</ParamField>

<ParamField query="limit" type="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.
</ParamField>

<ParamField query="cursor" type="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](#the-list-object) cursor field. If not provided, the API will return items from the beginning of the list.
</ParamField>

## Response

Returns a [list object](/api-reference/pagination#the-list-object) containing an array of [event definition objects](/api-reference/event-definitions/model) in the `results` property. The response includes pagination information in the `next` and `previous` fields.

<RequestExample>
  ```bash Request theme={null}
  # 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'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "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
  }
  ```
</ResponseExample>
