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

# List Helpdesk tickets

> Ordered by `sortBy` and `order`, most recently updated first by default. A cursor only reads the next page of the same filters and agent. A Read only or Full access key can call it. A signed-in session needs the Owner, Member, Support Associate or Viewer role and an active Helpdesk membership on the agent.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/agents/{agentId}/helpdesk/tickets
openapi: 3.1.0
info:
  title: Centillion Labs API
  description: >-
    The public API of Centillion Labs: agents, their branches and versions,
    knowledge, tools and the secrets they send, chat, conversations, contacts,
    campaigns, batch calls, agent testing, issues and Helpdesk.
  version: 2.0.0
servers:
  - url: https://app.cntillion.com
security:
  - workspaceApiKey: []
  - workspaceApiKeyHeader: []
tags:
  - name: Agents
    description: Create, read, change, clone and delete agents.
  - name: Branches and versions
    description: Branches, drafts, immutable versions, merges, publishing and traffic.
  - name: Workflow and voice
    description: A branch's workflow and its voice settings.
  - name: Tools
    description: 'Workspace tools: HTTP, client, MCP server and code tools.'
  - name: Secrets
    description: >-
      Named credentials, such as an API key, that HTTP tools and MCP servers
      send as a header by naming the secret's id in
      `configuration.secretHeaders`. A value is encrypted when saved and never
      returned. A new value reaches every tool and published agent that uses the
      secret on its next call, with nothing to publish, and a secret can be
      deleted only once no tool and no published agent sends it.
  - name: Auth connections
    description: >-
      How the workspace's tools sign in to an API, kept once and named by id in
      an HTTP tool's or an MCP server's `configuration.authConnectionId` (or
      `configuration.page.authConnectionId` for a web form's link request).
      Secrets are encrypted when saved and never returned. A change reaches
      every tool and published agent that uses the connection on its next call,
      and a connection can be deleted only once nothing signs in with it.
  - name: Knowledge sources
    description: What an agent knows, and training it on that.
  - name: Chat
    description: Talk to an agent from your own systems.
  - name: Conversations
    description: Conversations, their messages, feedback and analysis.
  - name: Leads and contacts
    description: The leads and contacts an agent collected.
  - name: Contacts and enrollments
    description: Upsert contacts and enroll them in always-open campaigns.
  - name: Batch calls
    description: Outbound call batches, their recipients and their runs.
  - name: Campaigns
    description: >-
      Managed outbound calling: campaigns that call each lead within calling
      windows and retry, call back or redirect as their lead policy allows,
      their leads, calls and attention items, and the workspace's campaign
      settings.
  - name: WhatsApp
    description: WhatsApp templates and template messages.
  - name: Agent testing
    description: Workspace tests, agent suites, execution, and results.
  - name: Issues
    description: >-
      Issues an agent raised or a teammate flagged about how it behaves: triage,
      comment, merge and resolve.
  - name: Helpdesk
    description: Helpdesk tickets, their messages, teams and statuses.
  - name: Status
    description: Whether the API is up.
paths:
  /api/v2/agents/{agentId}/helpdesk/tickets:
    get:
      tags:
        - Helpdesk
      summary: List Helpdesk tickets
      description: >-
        Ordered by `sortBy` and `order`, most recently updated first by default.
        A cursor only reads the next page of the same filters and agent. A Read
        only or Full access key can call it. A signed-in session needs the
        Owner, Member, Support Associate or Viewer role and an active Helpdesk
        membership on the agent.
      operationId: listHelpdeskTickets
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
            description: Agent ID in the authenticated workspace.
        - name: cursor
          in: query
          required: false
          description: '`pagination.cursor` of the previous page.'
          schema:
            type: string
            minLength: 1
            maxLength: 2000
        - name: limit
          in: query
          required: false
          schema:
            default: 20
            type: integer
            minimum: 1
            maximum: 100
        - name: order
          in: query
          required: false
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
        - name: assigneeId
          in: query
          required: false
          description: A Helpdesk member ID, or `none` for unassigned.
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: teamId
          in: query
          required: false
          description: A team ID, or `none` for tickets with no team.
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: statusCategory
          in: query
          required: false
          description: Comma-separated, such as `new,on_you`.
          style: form
          explode: false
          schema:
            minItems: 1
            maxItems: 30
            type: array
            items:
              type: string
              enum:
                - new
                - on_you
                - on_customer
                - on_hold
                - closed
                - cancelled
        - name: statusId
          in: query
          required: false
          description: Comma-separated status IDs.
          style: form
          explode: false
          schema:
            minItems: 1
            maxItems: 30
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 128
        - name: channel
          in: query
          required: false
          description: Comma-separated, such as `email,api`.
          style: form
          explode: false
          schema:
            minItems: 1
            maxItems: 30
            type: array
            items:
              type: string
              enum:
                - chat_bubble
                - email
                - whatsapp
                - api
                - messenger
                - instagram
                - slack
                - center_stage
                - phone
                - help_desk
                - sms
        - name: priority
          in: query
          required: false
          description: Comma-separated, such as `high,urgent`.
          style: form
          explode: false
          schema:
            minItems: 1
            maxItems: 30
            type: array
            items:
              type: string
              enum:
                - none
                - low
                - normal
                - high
                - urgent
        - name: createdAfter
          in: query
          required: false
          description: Tickets created at or after this time.
          schema:
            type: string
            format: date-time
        - name: createdBefore
          in: query
          required: false
          description: Tickets created at or before this time.
          schema:
            type: string
            format: date-time
        - name: sortBy
          in: query
          required: false
          schema:
            default: updatedAt
            type: string
            enum:
              - createdAt
              - updatedAt
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListHelpdeskTicketsResponse'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/Error409'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '504':
          $ref: '#/components/responses/Error504'
      security:
        - workspaceApiKey: []
        - workspaceApiKeyHeader: []
        - dashboardSession: []
components:
  schemas:
    ListHelpdeskTicketsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/HelpdeskTicket'
        pagination:
          type: object
          properties:
            total:
              type: integer
              minimum: 0
            hasMore:
              type: boolean
            cursor:
              description: Send as `cursor` to read the next page.
              type:
                - string
                - 'null'
          required:
            - total
            - hasMore
            - cursor
      required:
        - data
        - pagination
    HelpdeskTicket:
      type: object
      properties:
        ticketNumber:
          type: integer
        id:
          type: string
        subject:
          type: string
        description:
          type: string
        statusCategory:
          type: string
          enum:
            - new
            - on_you
            - on_customer
            - on_hold
            - closed
            - cancelled
        statusId:
          type: string
        assigneeId:
          type:
            - string
            - 'null'
        teamId:
          type:
            - string
            - 'null'
        priority:
          type: string
          enum:
            - none
            - low
            - normal
            - high
            - urgent
        tags:
          type: array
          items:
            type: string
        channel:
          type: string
          enum:
            - chat_bubble
            - email
            - whatsapp
            - api
            - messenger
            - instagram
            - slack
            - center_stage
            - phone
            - help_desk
            - sms
          description: Where the ticket came from. `api` for one created here.
        conversationId:
          description: The conversation the ticket came from, when there is one.
          type:
            - string
            - 'null'
        channelConversationId:
          type:
            - string
            - 'null'
        customer:
          type: object
          properties:
            id:
              type: string
              description: >-
                The contact's ID, or `anonymous:<ticket id>` when the ticket has
                no contact.
            name:
              type:
                - string
                - 'null'
            email:
              type:
                - string
                - 'null'
            externalId:
              type:
                - string
                - 'null'
            phoneNumber:
              type:
                - string
                - 'null'
            attributes:
              $ref: '#/components/schemas/JsonValue'
          required:
            - id
            - name
            - email
            - externalId
            - phoneNumber
            - attributes
        customFields:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type:
              - string
              - boolean
              - 'null'
          description: >-
            Values keyed by field ID. Dropdowns answer the option ID, numbers a
            string, dates YYYY-MM-DD and images a download link.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        lastMessageAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
      required:
        - ticketNumber
        - id
        - subject
        - description
        - statusCategory
        - statusId
        - assigneeId
        - teamId
        - priority
        - tags
        - channel
        - conversationId
        - channelConversationId
        - customer
        - customFields
        - createdAt
        - updatedAt
        - lastMessageAt
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A stable code, such as `NOT_FOUND`.
            message:
              type: string
              description: What went wrong, for a person.
            details:
              description: More about the failure, on some endpoints.
          required:
            - code
            - message
      required:
        - error
    JsonValue:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
  responses:
    Error400:
      description: The request is invalid. `error.message` names the first problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error401:
      description: No valid workspace API key was sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error403:
      description: The key or the workspace's plan does not allow this request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error404:
      description: The endpoint, or a record it names, was not found in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error409:
      description: The record changed since it was read, or its state does not allow this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error429:
      description: Too many requests. Wait for `Retry-After` seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error500:
      description: The request could not be completed. Try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error504:
      description: The request took too long. Try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      bearerFormat: cl_api_...
      description: >-
        A workspace API key from Workspace settings > API keys, sent as
        `Authorization: Bearer cl_api_...`. A Read only key can call the GET
        endpoints; every other method needs a Full access key.
    workspaceApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        The same workspace API key, for a gateway that keeps `Authorization` for
        itself.
    dashboardSession:
      type: http
      scheme: bearer
      bearerFormat: Session token
      description: >-
        The session of a member signed in to the workspace that owns the agent.
        Browser sessions may send their session cookie instead.

````

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