Search tickets

You can search for multiple tickets by the value of their attributes in order to fetch exactly which ones you want.

To search for tickets, you send a POST request to https://api.intercom.io/tickets/search.

This will accept a query object in the body which will define your filters.

Nesting & Limitations

You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4). There are some limitations to the amount of multiples there can be:

  • There's a limit of max 2 nested filters
  • There's a limit of max 15 filters for each AND or OR group

Accepted Fields

Most keys listed as part of the Ticket model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as created_at accepts a date, the value cannot be a string such as "foobar").

FieldType
idString
created_atDate (UNIX timestamp)
updated_atDate (UNIX timestamp)
titleString
descriptionString
categoryString
ticket_type_idString
contact_idsString
teammate_idsString
admin_assignee_idString
team_assignee_idString
openBoolean
stateString
snoozed_untilDate (UNIX timestamp)
ticket_attribute.{id}String or Boolean or Date (UNIX timestamp) or Float or Integer

Accepted Operators

Searching based on `created_at`

You may use the <= or >= operators to search by created_at.

The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string ("="). The operator has to be compatible with the field's type (eg. you cannot search with > for a given string value as it's only compatible for integer's and dates).

OperatorValid TypesDescription
=AllEquals
!=AllDoesn't Equal
INAllIn Shortcut for OR queries Values most be in Array
NINAllNot In Shortcut for OR ! queries Values must be in Array
>Integer Date (UNIX Timestamp)Greater (or equal) than
<Integer Date (UNIX Timestamp)Lower (or equal) than
~StringContains
!~StringDoesn't Contain
^StringStarts With
$StringEnds With
SecurityHTTP: bearerAuth
Request
header Parameters
Intercom-Version
string (intercom_version)
Default: 2.10

Intercom API version.
By default, it's equal to the version set in the app package.

Enum: "1.0" "1.1" "1.2" "1.3" "1.4" "2.0" "2.1" "2.2" "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9" "2.10" "Unstable"
Example: 2.10
Request Body schema: application/json
required
single_filter_search_request (object) or multiple_filter_search_request (object)
object or null (StartingAfterPaging)
post
/tickets/search
Request samples
application/json
{ "query": { "operator": "AND", } }
Responses

200

successful

Response Schema: application/json
type
string

Always ticket.list

Value: "ticket.list"
Array of objects or null (Ticket)

The list of ticket objects

total_count
integer

A count of the total number of objects.

object or null (Cursor based pages)

Cursor-based pagination is a technique used in the Intercom API to navigate through large amounts of data. A "cursor" or pointer is used to keep track of the current position in the result set, allowing the API to return the data in small chunks or "pages" as needed.

Response samples
application/json
{ "type": "ticket.list", "pages": { "type": "pages", "page": 1, "per_page": 150, "total_pages": 1 }, "total_count": 1, "tickets": [ ] }