v51

latestOpenAPI 3.0.1MITraw.githubusercontent.com2026-08-01150230854.3 KB
Tickets

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. {% admonition type="warning" name="Optimizing search queries" %} Search queries can be complex, so optimizing them can help the performance of your search. Use the AND and OR operators to combine multiple filters to get the exact results you need and utilize pagination to limit the number of results returned. The default is 20 results per page. See the pagination section for more details on how to use the starting_after param. {% /admonition %}

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"). The source.body field is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a "I need support" body - the query should contain a = operator with the value "support" for such conversation to be returned. A query with a = operator and a "need support" value will not yield a result.

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

{% admonition type="info" name="Searching by Category" %} When searching for tickets by the category field, specific terms must be used instead of the category names:

  • For Customer category tickets, use the term request.
  • For Back-office category tickets, use the term task.
  • For Tracker category tickets, use the term tracker. {% /admonition %}

Accepted Operators

{% admonition type="info" name="Searching based on created_at" %} You may use the <= or >= operators to search by created_at. {% /admonition %}

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
post/tickets/search

Headers

Intercom-Version'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' | '2.11' | '2.12' | '2.13' | '2.14'

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

Example:2.14

Request body

Example request

{
  "query": {
    "field": "created_at",
    "operator": ">"
  },
  "pagination": {
    "per_page": 2,
    "starting_after": "your-cursor-from-response"
  }
}

Response

successful

type'ticket.list'

Always ticket.list

total_countinteger

A count of the total number of objects.

Example response

{
  "type": "ticket.list",
  "tickets": [
    {
      "type": "ticket",
      "id": "1295",
      "ticket_id": "1390",
      "category": "Customer",
      "ticket_attributes": {
        "_default_title_": "Found a bug",
        "_default_description_": "The button's not working"
      },
      "ticket_state": {
        "type": "ticket_state",
        "id": "12",
        "category": "in_progress",
        "internal_label": "With Dev Team",
        "external_label": "In Progress"
      },
      "ticket_type": {
        "type": "ticket_type",
        "id": "1295",
        "category": "Customer",
        "name": "Bug",
        "description": "A bug that has been reported.",
        "icon": "🐞",
        "workspace_id": "ecahpwf5",
        "ticket_type_attributes": {
          "ticket_type_attributes": [
            {
              "type": "ticket_type_attribute",
              "id": "1",
              "workspace_id": "ecahpwf5",
              "name": "Title",
              "description": "Bug title.",
              "data_type": "string",
              "order": 1,
              "default": true,
              "ticket_type_id": 42
            }
          ]
        },
        "ticket_states": {
          "type": "list",
          "data": [
            {
              "type": "ticket_state",
              "id": "12",
              "category": "in_progress",
              "internal_label": "With Dev Team",
              "external_label": "In Progress"
            }
          ]
        }
      },
      "contacts": {
        "type": "contact.list",
        "contacts": [
          {
            "type": "contact",
            "id": "5ba682d23d7cf92bef87bfd4",
            "external_id": "70"
          }
        ]
      },
      "admin_assignee_id": "1295",
      "team_assignee_id": "1295",
      "created_at": 1663597223,
      "updated_at": 1663597260,
      "open": true,
      "snoozed_until": 1663597260,
      "linked_objects": {
        "type": "list",
        "total_count": 100,
        "data": [
          {
            "type": "ticket",
            "id": "7583",
            "category": "Customer"
          }
        ]
      },
      "ticket_parts": {
        "type": "ticket_part.list",
        "ticket_parts": [
          {
            "type": "ticket_part",
            "id": "3",
            "part_type": "comment",
            "body": "<p>Okay!</p>",
            "previous_ticket_state": "submitted",
            "ticket_state": "submitted",
            "created_at": 1663597223,
            "updated_at": 1663597260,
            "assigned_to": {
              "type": "contact",
              "id": "1a2b3c"
            },
            "author": {
              "type": "admin",
              "id": "274",
              "name": "Operator",
              "email": "operator+abcd1234@intercom.io"
            },
            "attachments": [
              {
                "type": "upload",
                "name": "example.png",
                "url": "https://picsum.photos/200/300",
                "content_type": "image/png",
                "filesize": 100,
                "width": 100,
                "height": 100
              }
            ],
            "external_id": "abcd1234",
            "app_package_code": "text-integration",
            "updated_attribute_data": {
              "attribute": {
                "type": "attribute",
                "id": "7",
                "label": "Progress"
              },
              "value": {
                "type": "value",
                "id": "Fast",
                "label": "Fast"
              }
            }
          }
        ],
        "total_count": 2
      },
      "is_shared": true
    }
  ],
  "total_count": 12345,
  "pages": {
    "type": "pages",
    "page": 1,
    "next": {
      "per_page": 2,
      "starting_after": "your-cursor-from-response"
    },
    "per_page": 2,
    "total_pages": 13
  }
}