> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theymes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List tickets

> List tickets for the company associated with the API key. Filter by identity, scope, status, tags, custom fields, or creation date. Results are paginated; use the returned cursor with the same ordering to fetch the next page.



## OpenAPI

````yaml https://api.theymes.com/v2/openapi.json get /tickets
openapi: 3.1.0
info:
  title: Theymes API v2
  version: 2.0.0
  description: >-
    Theymes API allows you to interact with the Theymes platform.



    Most endpoints require an API key for authentication. You can generate an
    API key in the Theymes dashboard.



    The API key should be included in the Authorization header
    (```Authorization: Bearer <YOUR_KEY>```).



    The public support link endpoints do not require authentication and are
    grouped separately below.
servers:
  - url: https://api.theymes.com/v2
security: []
tags:
  - name: Authenticated endpoints (API key)
    description: Endpoints that require an API key in the Authorization header.
  - name: Public support links (no authentication)
    description: >-
      Endpoints for creating web support sessions and links. These require no
      authentication and are identified by an app environment token.
paths:
  /tickets:
    get:
      tags:
        - Authenticated endpoints (API key)
      summary: List tickets
      description: >-
        List tickets for the company associated with the API key. Filter by
        identity, scope, status, tags, custom fields, or creation date. Results
        are paginated; use the returned cursor with the same ordering to fetch
        the next page.
      operationId: getTickets
      parameters:
        - schema:
            type: string
          required: false
          name: email
          in: query
        - schema:
            type: string
            format: uuid
          required: false
          name: ticketId
          in: query
        - schema:
            type: string
            description: >-
              JSON-encoded array of tag names. A ticket must contain every
              supplied tag. Example: `["vip","billing"]`.
          required: false
          description: >-
            JSON-encoded array of tag names. A ticket must contain every
            supplied tag. Example: `["vip","billing"]`.
          name: tags
          in: query
        - schema:
            type: string
            description: >-
              JSON-encoded object of custom field keys and values. A ticket must
              match every supplied field; dropdown fields must contain all
              supplied options. Example:
              `{"priority":["high"],"escalated":true}`.
          required: false
          description: >-
            JSON-encoded object of custom field keys and values. A ticket must
            match every supplied field; dropdown fields must contain all
            supplied options. Example: `{"priority":["high"],"escalated":true}`.
          name: fields
          in: query
        - schema:
            type: string
            description: >-
              JSON-encoded array of ticket statuses. A ticket matches when its
              status is any of the supplied values. Allowed values: `new`,
              `assigned`, `unassigned`, `waiting`, `on_hold`, `closed`. Example:
              `["new","waiting"]`.
          required: false
          description: >-
            JSON-encoded array of ticket statuses. A ticket matches when its
            status is any of the supplied values. Allowed values: `new`,
            `assigned`, `unassigned`, `waiting`, `on_hold`, `closed`. Example:
            `["new","waiting"]`.
          name: status
          in: query
        - schema:
            type: string
            format: date
            description: Only return tickets created on or after this date
          required: false
          description: Only return tickets created on or after this date
          name: createdAfter
          in: query
        - schema:
            type: string
            format: date
            description: Only return tickets created on or before this date
          required: false
          description: Only return tickets created on or before this date
          name: createdBefore
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
            description: Sort by ticket creation order, oldest first or newest first
          required: false
          description: Sort by ticket creation order, oldest first or newest first
          name: order
          in: query
        - schema:
            type: string
            description: >-
              Pagination cursor returned from a previous response. Must be used
              with the same `order` direction it was obtained with. Omit when
              starting a new scan.
          required: false
          description: >-
            Pagination cursor returned from a previous response. Must be used
            with the same `order` direction it was obtained with. Omit when
            starting a new scan.
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          required: false
          name: limit
          in: query
        - schema:
            type: string
            format: uuid
          required: false
          name: appId
          in: query
        - schema:
            type: string
          required: false
          name: customerId
          in: query
        - schema:
            type: string
            description: Bearer token API key
          required: true
          description: Bearer token API key
          name: Authorization
          in: header
      responses:
        '200':
          description: A list of tickets
          content:
            application/json:
              schema:
                type: object
                properties:
                  tickets:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        runningId:
                          type: integer
                          description: Human-readable running ticket number
                        url:
                          type: string
                          description: >-
                            URL to view the conversation in the support
                            application
                        email:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Customer email associated with the ticket, when
                            available
                        status:
                          type: string
                          enum:
                            - new
                            - assigned
                            - unassigned
                            - waiting
                            - on_hold
                            - closed
                        assigneeId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          default: null
                          description: >-
                            ID of the agent currently assigned to the ticket.
                            Null when the ticket is unassigned.
                        assigneeName:
                          type:
                            - string
                            - 'null'
                          default: null
                          description: >-
                            Display name of the agent currently assigned to the
                            ticket. Null when the ticket is unassigned.
                        supportSource:
                          type:
                            - string
                            - 'null'
                          enum:
                            - IN_APP
                            - WIDGET
                            - EMAIL
                            - MESSENGER
                            - WEB
                            - API
                            - STARTED_BY_AGENT
                            - TEST_GENERATED
                            - MIGRATED
                            - null
                          description: Origin through which the ticket was created
                        channels:
                          type: array
                          items:
                            type: string
                            enum:
                              - chat
                              - email
                              - messenger
                        language:
                          type: string
                          enum:
                            - en
                            - de
                            - es
                            - es-AR
                            - es-MX
                            - fi
                            - fil
                            - fr
                            - id
                            - ja
                            - ko
                            - ms
                            - pt
                            - pt-BR
                            - ru
                            - tr
                            - uk
                            - vi
                            - zh
                            - zh-Hans
                            - zh-Hant
                            - ar
                            - cs
                            - da
                            - nl
                            - el
                            - hu
                            - it
                            - 'no'
                            - nb
                            - pl
                            - ro
                            - sk
                            - sv
                            - th
                        resolutionType:
                          type:
                            - string
                            - 'null'
                          enum:
                            - resolved
                            - rejected
                            - auto_closed
                            - merged
                            - null
                        csatScore:
                          type:
                            - integer
                            - 'null'
                          minimum: 1
                          maximum: 5
                        csatReview:
                          type:
                            - string
                            - 'null'
                        issueSummary:
                          type:
                            - string
                            - 'null'
                        issueResolution:
                          type:
                            - string
                            - 'null'
                        followUpTicketId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        reopenedFromTicketId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        createdAt:
                          type: string
                          format: date-time
                        lastActivityAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                        tags:
                          type: array
                          items:
                            type: string
                        fields:
                          type: object
                          additionalProperties:
                            anyOf:
                              - type: string
                              - type: number
                              - type: array
                                items:
                                  type: string
                              - type: boolean
                          description: >-
                            Custom fields associated with the ticket, keyed by
                            the configured field key
                        metadata:
                          type: object
                          additionalProperties:
                            anyOf:
                              - type: string
                              - type: number
                              - type: array
                                items:
                                  type: string
                              - type: boolean
                          description: Builtin metadata fields associated with the ticket
                        appId:
                          type: string
                          format: uuid
                        appEnvironmentId:
                          type: string
                          format: uuid
                        theymesCustomerId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: Theymes internal customer ID
                        customerId:
                          type:
                            - string
                            - 'null'
                          description: >-
                            External customer ID provided by the app, null for
                            email/web tickets
                        customerName:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Customer name associated with the ticket, when
                            available
                      required:
                        - id
                        - runningId
                        - url
                        - email
                        - status
                        - supportSource
                        - channels
                        - language
                        - resolutionType
                        - csatScore
                        - csatReview
                        - issueSummary
                        - issueResolution
                        - followUpTicketId
                        - reopenedFromTicketId
                        - createdAt
                        - lastActivityAt
                        - tags
                        - fields
                        - metadata
                        - appId
                        - appEnvironmentId
                        - theymesCustomerId
                        - customerId
                        - customerName
                  pagination:
                    type: object
                    properties:
                      cursor:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Cursor for pagination if more results are available
                          else null
                    required:
                      - cursor
                required:
                  - tickets
                  - pagination

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.