GET
/
events
curl --request GET \
  --url https://api.trench.dev/events
{
  "limit": 123,
  "offset": 123,
  "total": 123,
  "results": [
    {
      "uuid": "123",
      "type": "track",
      "event": "user_signed_up",
      "userId": "user-123",
      "groupId": "group-456",
      "anonymousId": "anon-789",
      "instanceId": "instance-101112",
      "properties": {
        "key": "value"
      }
    }
  ]
}
This endpoint requires your private API key.

Query Parameters

event
string

The event name to filter by.

Example:

"Created Account"

uuid
string

The UUID to filter by.

Example:

"123e4567-e89b-12d3-a456-426614174000"

userId
string

The user ID to filter by.

Example:

"user-123"

groupId
string

The group ID to filter by.

Example:

"group-456"

anonymousId
string

The anonymous ID to filter by.

Example:

"anon-789"

instanceId
string

The instance ID to filter by.

Example:

"instance-101112"

startDate
string

The start date to filter by.

Example:

"2022-01-01T00:00:00Z"

endDate
string

The end date to filter by.

Example:

"2022-12-31T23:59:59Z"

limit
number

The limit of records to return.

Example:

100

offset
number

The offset of records to return.

Example:

0

orderByField
string

The field to order by.

Example:

"timestamp"

orderByDirection
enum<string>

The direction to order by.

Available options:
ASC,
DESC
Example:

"ASC"

Response

200 - application/json
The events have been successfully retrieved.
limit
number | null
required

The limit of the pagination.

offset
number | null
required

The offset of the pagination.

total
number | null
required

The total number of results. If null, the total is unknown.

results
object[]
required

The events found based on the query.

Example:
[
  {
    "uuid": "123",
    "type": "track",
    "event": "user_signed_up",
    "userId": "user-123",
    "groupId": "group-456",
    "anonymousId": "anon-789",
    "instanceId": "instance-101112",
    "properties": { "key": "value" }
  }
]