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

# List tickets



## OpenAPI

````yaml /api-reference/openapi.json get /v1/helpdesk/tickets
openapi: 3.0.0
info:
  title: Totebot Public API
  description: >-
    Manage your agents (settings, instructions, widget, skills, actions, MCP
    connections, integrations), their knowledge, test questions, the help desk,
    customers and your team from code, read conversations and analytics, and
    analyse which knowledge each answer used.


    Authenticate with a Bearer token: a team API key (`tb_live_…`, created by a
    team owner in Team settings → API keys) or a legacy per-agent key.

    New keys can only read. Write access is opt-in per area (`agents:write`,
    `plugins:write`, `knowledge:write`, `conversations:write`, `helpdesk:write`,
    `team:write`, `members:write`, `chat:write`, `customers:delete`,
    `quality:write`, `experiments:write`, `sales:write`). Provider cost in USD
    needs the opt-in `billing:read` scope. A key may also be limited to some
    agents.

    Routes that act on one agent take it from the `agentId` path parameter or,
    on the older `/v1/<resource>` routes, from the `X-Agent-Id` header.

    Write routes accept an `Idempotency-Key` header. Over the rate limit you get
    429 with `Retry-After`. Errors share one shape: `{ status: "error", error: {
    code, message, details } }`.

    Not available through the API, on purpose: billing and plan changes,
    deleting the team, creating or changing API keys, and OAuth connect flows.


    This spec is public at https://api.totebot.ai/v1/openapi.json (and .yaml).
  version: '2.0'
  contact: {}
servers:
  - url: https://api.totebot.ai
security: []
tags: []
paths:
  /v1/helpdesk/tickets:
    get:
      tags:
        - Help desk
      summary: List tickets
      operationId: PublicApiHelpdeskController_list
      parameters:
        - name: view
          required: false
          in: query
          schema:
            default: ALL
            type: string
            enum:
              - ALL
              - UNASSIGNED
              - RESOLVED
        - name: status
          required: false
          in: query
          schema:
            $ref: '#/components/schemas/TicketStatus'
        - name: priority
          required: false
          in: query
          schema:
            $ref: '#/components/schemas/TicketPriority'
        - name: agentId
          required: false
          in: query
          description: >-
            Only tickets from this agent. Required for keys limited to several
            agents.
          schema:
            type: string
        - name: search
          required: false
          in: query
          description: >-
            Matches subject, description and contact email, so it needs the
            `customers:read` scope (403 without it).
          schema:
            type: string
            maxLength: 200
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: limit
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 100
            default: 20
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketListDto'
        '400':
          description: Invalid request, or rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '401':
          description: Missing, invalid, revoked or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '403':
          description: >-
            The plan lacks the feature, or the key lacks a scope
            (`error.details.missingScopes`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '404':
          description: Not found, or not an agent this key can access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
      security:
        - api-key: []
components:
  schemas:
    TicketStatus:
      type: string
      enum:
        - SUBMITTED
        - IN_PROGRESS
        - WAITING_ON_CUSTOMER
        - RESOLVED
    TicketPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
    TicketListDto:
      type: object
      properties:
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketDto'
        pagination:
          $ref: '#/components/schemas/TicketListPaginationDto'
      required:
        - tickets
        - pagination
    ApiErrorDto:
      type: object
      properties:
        status:
          type: string
          example: error
        error:
          $ref: '#/components/schemas/ApiErrorBodyDto'
        path:
          type: string
          example: /v1/agents/clx123
        timestamp:
          type: string
          example: '2026-11-24T10:00:00.000Z'
      required:
        - status
        - error
        - path
        - timestamp
    TicketDto:
      type: object
      properties:
        id:
          type: string
        number:
          type: number
          description: Per-team ticket number.
        subject:
          type: string
          description: >-
            Emails and phone numbers are masked as [email] and [phone] without
            `customers:read`.
        description:
          type: string
          nullable: true
          description: >-
            Emails and phone numbers are masked as [email] and [phone] without
            `customers:read`.
        status:
          allOf:
            - $ref: '#/components/schemas/TicketStatus'
        priority:
          allOf:
            - $ref: '#/components/schemas/TicketPriority'
        agent:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TicketAgentDto'
        assignee:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TicketPersonDto'
        requester:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TicketRequesterDto'
        conversationId:
          type: string
          nullable: true
        contactPreference:
          type: string
        contactEmail:
          type: string
          nullable: true
          description: Only for keys with `customers:read`.
        resolvedAt:
          type: string
          nullable: true
          format: date-time
        lastActivityAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - number
        - subject
        - description
        - status
        - priority
        - agent
        - assignee
        - requester
        - conversationId
        - contactPreference
        - resolvedAt
        - lastActivityAt
        - createdAt
    TicketListPaginationDto:
      type: object
      properties:
        page:
          type: number
        limit:
          type: number
        total:
          type: number
      required:
        - page
        - limit
        - total
    ApiErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: NotFoundException
        message:
          type: string
          example: Agent not found
        details:
          type: object
          description: >-
            Extra fields, e.g. `missingScopes` on 403 or `secondsRemaining` on a
            training cooldown.
          additionalProperties: true
      required:
        - code
        - message
    TicketAgentDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    TicketPersonDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
      required:
        - id
        - name
    TicketRequesterDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
          description: Null unless the key has `customers:read`.
        email:
          type: string
          nullable: true
          description: Only for keys with `customers:read`.
        phone:
          type: string
          nullable: true
          description: Only for keys with `customers:read`.
      required:
        - id
        - name
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

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