Skip to main content
POST
/
v2
/
tickets
/
search
Search Tickets
curl --request POST \
  --url https://public.api.serval.com/v2/tickets/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamIds": [
    "<string>"
  ],
  "assignedToUserIds": [
    "<string>"
  ],
  "requesterUserIds": [
    "<string>"
  ],
  "statusIds": [
    "<string>"
  ],
  "escalationLevels": [
    "AI"
  ],
  "createdAfter": "2023-11-07T05:31:56Z",
  "createdBefore": "2023-11-07T05:31:56Z",
  "pageSize": 123,
  "pageToken": "<string>"
}
'
{
  "data": [
    {
      "id": "<string>",
      "friendlyIdentifier": "<string>",
      "teamId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "completedAt": "2023-11-07T05:31:56Z",
      "escalatedAt": "2023-11-07T05:31:56Z",
      "createdByUserId": "<string>",
      "assignedToUserId": "<string>",
      "requesterUserId": "<string>",
      "statusId": "<string>",
      "escalationLevel": "AI",
      "priorityId": "<string>",
      "slaStartedAt": "2023-11-07T05:31:56Z",
      "slaBreachesAt": "2023-11-07T05:31:56Z",
      "labelIds": [
        "<string>"
      ],
      "type": "TICKET_TYPE_UNSPECIFIED",
      "dueDate": {
        "year": 123,
        "month": 123,
        "day": 123
      },
      "isOverdue": true,
      "childTicketIds": [
        "<string>"
      ],
      "linkedTicketIds": [
        "<string>"
      ],
      "duplicateTicketIds": [
        "<string>"
      ],
      "dependsOnTicketIds": [
        "<string>"
      ],
      "parentTicketId": "<string>",
      "conversationThreadTicketIds": [
        "<string>"
      ],
      "conversationThreadParentTicketId": "<string>",
      "nameTranslations": {},
      "descriptionTranslations": {}
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamIds
string[]

Optional. Filter to specific teams. If not provided, searches all accessible teams.

assignedToUserIds
string[]

Optional. Only return tickets assigned to any of these users.

requesterUserIds
string[]

Optional. Only return tickets requested by any of these users.

statusIds
string[]

Optional. Filter by status IDs. Returns tickets matching ANY of the specified statuses.

escalationLevels
enum<string>[]

Optional. Filter by escalation levels. Returns tickets matching ANY of the specified levels.

Available options:
AI,
HUMAN
createdAfter
string<date-time> | null

Optional. Only include tickets created at or after this time.

createdBefore
string<date-time> | null

Optional. Only include tickets created at or before this time.

pageSize
integer<int32> | null

Maximum number of results to return. Default is 1000, maximum is 5000.

pageToken
string | null

Token for pagination. Leave empty for the first request.

Response

Success

data
Ticket · object[]
nextPageToken
string | null

Token for retrieving the next page of results. Empty if no more results.