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

# List a customer's tickets



## OpenAPI

````yaml /api-reference/support-openapi.json get /api/integration/ai_service/customer/{customer_id}/tickets
openapi: 3.1.0
info:
  title: Clarity Support API
  version: '1.0'
  description: Tickets, customers, messages, the knowledge base, and webhooks.
servers:
  - url: https://back.leap.onclarity.com
security:
  - organizationApiKey: []
tags:
  - name: AI service
    description: >-
      Hand a customer conversation to your Clarity AI agent from your own app or
      backend.
  - name: Messages
    description: Reply to customers on their ticket's channel and add private notes.
  - name: Customers
    description: Create, update, and look up customers and their custom attributes.
  - name: Tickets
    description: >-
      Change a ticket's status, assignee, category, and tags, and list the
      values they take.
  - name: Knowledge base
    description: Manage the articles your AI agents answer from.
  - name: Webhooks
    description: Subscribe your endpoints to events in your organization.
paths:
  /api/integration/ai_service/customer/{customer_id}/tickets:
    get:
      tags:
        - AI service
      summary: List a customer's tickets
      operationId: ApiIntegrationAiServiceCustomerCustomerIdTicketsGetCustomerTickets
      parameters:
        - name: customer_id
          in: path
          schema:
            type: integer
          required: true
          deprecated: false
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
          required: false
          deprecated: false
          allowEmptyValue: false
          allowReserved: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerTicketsResponse'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KTSErrorResponse'
        '500':
          description: Server got itself in trouble
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KTSErrorResponse'
      deprecated: false
components:
  schemas:
    CustomerTicketsResponse:
      properties:
        tickets:
          items:
            $ref: '#/components/schemas/CustomerTicket'
          type: array
      type: object
      required:
        - tickets
      title: CustomerTicketsResponse
    KTSErrorResponse:
      properties:
        status:
          type: string
          default: error
        code:
          type: string
        message:
          oneOf:
            - type: string
            - type: 'null'
        extra:
          oneOf:
            - additionalProperties: {}
              type: object
            - items: {}
              type: array
            - type: 'null'
      type: object
      required:
        - code
      title: KTSErrorResponse
    CustomerTicket:
      properties:
        id:
          type: integer
        conversation_id:
          type: integer
        channel:
          $ref: '#/components/schemas/ChannelType'
        status_id:
          type: integer
        status:
          $ref: '#/components/schemas/TicketStatus'
        priority_id:
          type: integer
        priority:
          $ref: '#/components/schemas/TicketPriority'
        category_id:
          oneOf:
            - type: integer
            - type: 'null'
        category:
          oneOf:
            - $ref: '#/components/schemas/TicketCategory'
            - type: 'null'
        created_at:
          type: string
          format: date-time
        team:
          oneOf:
            - $ref: '#/components/schemas/TicketTeam'
            - type: 'null'
        is_archived:
          type: boolean
        summary:
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - channel
        - conversation_id
        - created_at
        - id
        - is_archived
        - priority
        - priority_id
        - status
        - status_id
      title: CustomerTicket
    ChannelType:
      type: string
      enum:
        - whatsapp
        - android_sdk
        - ios_sdk
        - web
        - voice
        - social
        - x
        - email
        - instagram
        - linkedin
      title: ChannelType
      description: Channel type (web, android_sdk, ios_sdk, whatsapp)
    TicketStatus:
      properties:
        id:
          type: integer
        organization_id:
          type: integer
        name:
          type: string
        state:
          $ref: '#/components/schemas/TicketStatusState'
        color:
          type: string
        description:
          type: string
      type: object
      required:
        - color
        - description
        - id
        - name
        - organization_id
        - state
      title: TicketStatus
    TicketPriority:
      properties:
        id:
          type: integer
        organization_id:
          type: integer
        name:
          type: string
        color:
          type: string
        weight:
          type: integer
      type: object
      required:
        - color
        - id
        - name
        - organization_id
        - weight
      title: TicketPriority
    TicketCategory:
      properties:
        id:
          type: integer
        organization_id:
          type: integer
        label:
          type: string
        parent_id:
          oneOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - id
        - label
        - organization_id
      title: TicketCategory
    TicketTeam:
      properties:
        id:
          type: integer
        name:
          type: string
        avatar_url:
          oneOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - id
        - name
      title: TicketTeam
    TicketStatusState:
      type: string
      enum:
        - open
        - closed
      title: TicketStatusState
      default: open
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: >-
        Your organization API key (it starts with `anek_org_`). The same key
        works on the Voice API and the Support API. See
        [Authentication](/authentication).

````

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