curl --request POST \
--url https://www.oration.ai/api/v2/tickets/search \
--header 'x-api-key: your-api-key-here' \
--header 'x-workspace-id: your-workspace-id-here' \
--header 'Content-Type: application/json' \
--data '{
"filters": { "statusId": { "eq": "b2c3d4e5-f6a7-8901-bcde-f12345678901" } },
"pagination": { "limit": 25, "offset": 0 },
"sort": [{ "column": "updatedAt", "direction": "desc" }]
}'
{
"data": [
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticketNumber": -1,
"ticketTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"summary": "<string>",
"source": "email",
"statusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": "urgent",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigneeUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignedTeamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerTeamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergedIntoTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"splitFromTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstResponseAt": "<string>",
"resolvedAt": "<string>",
"closedAt": "<string>",
"snoozedUntil": "<string>",
"lastCustomerActivityAt": "<string>",
"lastAgentActivityAt": "<string>",
"isShared": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"metadata": {
"hasNextPage": true
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Tickets
Search tickets
Filter, sort, and paginate tickets with the query builder.
POST
/
tickets
/
search
curl --request POST \
--url https://www.oration.ai/api/v2/tickets/search \
--header 'x-api-key: your-api-key-here' \
--header 'x-workspace-id: your-workspace-id-here' \
--header 'Content-Type: application/json' \
--data '{
"filters": { "statusId": { "eq": "b2c3d4e5-f6a7-8901-bcde-f12345678901" } },
"pagination": { "limit": 25, "offset": 0 },
"sort": [{ "column": "updatedAt", "direction": "desc" }]
}'
{
"data": [
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticketNumber": -1,
"ticketTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"summary": "<string>",
"source": "email",
"statusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": "urgent",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigneeUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignedTeamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ownerTeamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergedIntoTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"splitFromTicketId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstResponseAt": "<string>",
"resolvedAt": "<string>",
"closedAt": "<string>",
"snoozedUntil": "<string>",
"lastCustomerActivityAt": "<string>",
"lastAgentActivityAt": "<string>",
"isShared": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"metadata": {
"hasNextPage": true
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Search tickets in your workspace. Send filters in the request body — this endpoint uses the same query builder as the dashboard, so you can filter on any ticket column with operators like
eq, in, gte, and lte.
Workspace scope is applied for you. You never need to filter by workspaceId.
Request body
object
Column filters. Keys are ticket field names; values are operator objects.Examples:
{ "statusId": { "eq": "..." } }, { "priority": { "in": ["high", "urgent"] } }, { "updatedAt": { "gte": "2026-01-01T00:00:00.000Z" } }object
default:"{ \"limit\": 25, \"offset\": 0 }"
limit — max rows per page (default 25, max 100). offset — rows to skip.array
Sort instructions, e.g.
[{ "column": "updatedAt", "direction": "desc" }].array
Optional list of columns to return. Omit to get full ticket rows.
Response
array
Matching ticket rows (full or partial if
select is set).boolean
true if more results exist beyond this page. Increment offset by limit to fetch the next page.Examples
- By status
- API-created tickets
- Date range
curl --request POST \
--url https://www.oration.ai/api/v2/tickets/search \
--header 'x-api-key: your-api-key-here' \
--header 'x-workspace-id: your-workspace-id-here' \
--header 'Content-Type: application/json' \
--data '{
"filters": { "statusId": { "eq": "b2c3d4e5-f6a7-8901-bcde-f12345678901" } },
"pagination": { "limit": 25, "offset": 0 },
"sort": [{ "column": "updatedAt", "direction": "desc" }]
}'
curl --request POST \
--url https://www.oration.ai/api/v2/tickets/search \
--header 'x-api-key: your-api-key-here' \
--header 'x-workspace-id: your-workspace-id-here' \
--header 'Content-Type: application/json' \
--data '{
"filters": { "source": { "eq": "api" } },
"pagination": { "limit": 50, "offset": 0 }
}'
curl --request POST \
--url https://www.oration.ai/api/v2/tickets/search \
--header 'x-api-key: your-api-key-here' \
--header 'x-workspace-id: your-workspace-id-here' \
--header 'Content-Type: application/json' \
--data '{
"filters": {
"updatedAt": {
"gte": "2026-03-01T00:00:00.000Z",
"lte": "2026-03-31T23:59:59.999Z"
}
},
"pagination": { "limit": 25, "offset": 0 }
}'
Without
select, each item in data is a full ticket row. With select, only the requested columns are returned.Large workspaces: keep
limit at 25–100 and page with offset until hasNextPage is false. Tighter filters (status, assignee, dates) keep each page fast.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Minimum string length:
1Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
⌘I