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

# List contacts

> List all contacts for a specific agent. This endpoint supports pagination and filtering to help manage customer interactions efficiently.



## OpenAPI

````yaml get /api/v2/contacts
openapi: 3.0.1
info:
  title: LiveChatAI API v2
  description: >-
    LiveChatAI API v2 - Build powerful AI-powered customer support experiences.
    This API follows REST principles with predictable, resource-oriented URLs,
    JSON responses, and standard HTTP methods.
  version: 2.0.0
servers:
  - url: https://app.livechatai.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v2/contacts:
    get:
      tags:
        - Contacts
      summary: List contacts
      description: >-
        List all contacts for a specific agent. This endpoint supports
        pagination and filtering to help manage customer interactions
        efficiently.
      parameters:
        - in: query
          name: agentId
          schema:
            type: string
            example: clx1234567890abcdef
          required: true
          description: Unique identifier of the agent
        - in: query
          name: page
          schema:
            type: integer
            example: 1
            minimum: 1
          required: false
          description: 'Page number for pagination (default: 1)'
        - in: query
          name: limit
          schema:
            type: integer
            example: 10
            minimum: 1
            maximum: 100
          required: false
          description: 'Number of contacts per page (default: 10, max: 100)'
      responses:
        '200':
          description: Successfully retrieved contacts list
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  agentId:
                    type: string
                    example: clx1234567890abcdef
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: contact_1234567890
                        distinctId:
                          type: string
                          example: user_12345
                        name:
                          type: string
                          example: John Doe
                        email:
                          type: string
                          example: john@example.com
                        phone:
                          type: string
                          example: '+1234567890'
                        country:
                          type: string
                          example: US
                        createdAt:
                          type: string
                          format: date-time
                          example: '2024-01-15T10:30:00Z'
                  totalCount:
                    type: integer
                    example: 150
                    description: Total number of contacts across all pages
                  pages:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                        description: Current page number
                      perPage:
                        type: integer
                        example: 10
                        description: Number of items per page
                      totalPages:
                        type: integer
                        example: 15
                        description: Total number of pages
                      hasPrevious:
                        type: boolean
                        example: false
                        description: Whether there is a previous page
                      hasNext:
                        type: boolean
                        example: true
                        description: Whether there is a next page
                      previous:
                        type: integer
                        nullable: true
                        example: null
                        description: Previous page number (null if no previous page)
                      next:
                        type: integer
                        nullable: true
                        example: 2
                        description: Next page number (null if no next page)
        '400':
          description: >-
            Bad request - Missing or invalid parameters (e.g., agentId is
            required).
        '401':
          description: Unauthorized access
        '403':
          description: Access denied - Invalid agent access.
        '404':
          description: Chatbot not found or access denied.
        '500':
          description: An internal server error occurred.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````