> ## 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 conversations

> List conversations for an agent, with pagination and filtering options. This endpoint supports various filters including date range, agent assignment, and conversation status.



## OpenAPI

````yaml get /api/v2/conversations
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/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        List conversations for an agent, with pagination and filtering options.
        This endpoint supports various filters including date range, agent
        assignment, and conversation status.
      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: perPage
          schema:
            type: integer
            example: 20
            minimum: 1
            maximum: 100
          required: false
          description: 'Number of conversations per page (default: 20, max: 100)'
        - in: query
          name: type
          schema:
            type: string
            enum:
              - unassigned
              - your-inbox
              - all
            example: all
          required: false
          description: Type of conversations to retrieve
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - asc
              - desc
            example: desc
          required: false
          description: 'Sort order for lastMessageDate (default: desc)'
        - in: query
          name: status
          schema:
            type: string
            enum:
              - open
              - close
            example: open
          required: false
          description: Filter by conversation status
        - in: query
          name: startDate
          schema:
            type: string
            example: '2024-01-01'
          required: false
          description: >-
            Filter by start date. Supports Unix timestamp in seconds (e.g.,
            1747196400) or ISO 8601 format (e.g., 2024-01-01)
        - in: query
          name: endDate
          schema:
            type: string
            example: '2024-01-31'
          required: false
          description: >-
            Filter by end date. Supports Unix timestamp in seconds (e.g.,
            1747200000) or ISO 8601 format (e.g., 2024-01-31)
        - in: query
          name: assignedTo
          schema:
            type: string
            example: user_1234567890
          required: false
          description: >-
            Filter by assigned agent ID. Use 'ai' for AI-handled conversations
            (no human agent assigned)
        - in: query
          name: sentiment
          schema:
            type: string
            enum:
              - POSITIVE
              - NEGATIVE
              - NEUTRAL
              - UNSPECIFIED
            example: POSITIVE
          required: false
          description: Filter by conversation sentiment
        - in: query
          name: topic
          schema:
            type: string
            example: billing
          required: false
          description: Filter by conversation topic name
        - in: query
          name: channel
          schema:
            type: string
            enum:
              - WHATSAPP
              - SLACK
              - MESSENGER
              - FULLPAGE
              - INLINECHAT
              - PREVIEW
              - ONBOARDING
            example: WHATSAPP
          required: false
          description: Filter by conversation channel (integration type or chat type)
        - in: query
          name: resolutionStatus
          schema:
            type: string
            enum:
              - AIHelped
              - AIDidNotHelp
              - TalkToAgent
            example: AIHelped
          required: false
          description: Filter by resolution status
        - in: query
          name: viewId
          schema:
            type: string
            example: clx1234567890viewid
          required: false
          description: >-
            Filter using a saved inbox view ID. When provided, applies all
            filters configured in the inbox view. Create inbox views from the
            dashboard. Other filters can be combined with viewId
      responses:
        '200':
          description: Successfully retrieved conversations list
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      conversations:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: chat_1234567890
                            isResolved:
                              type: boolean
                              example: false
                            isStarred:
                              type: boolean
                              example: false
                            isMuted:
                              type: boolean
                              example: false
                            isAgent:
                              type: boolean
                              example: false
                            integrationType:
                              type: string
                              enum:
                                - WHATSAPP
                                - SLACK
                              example: WHATSAPP
                            contact:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: contact_1234567890
                                name:
                                  type: string
                                  example: John Doe
                                phone:
                                  type: string
                                  example: '+1234567890'
                                email:
                                  type: string
                                  example: john@example.com
                                distinctId:
                                  type: string
                                  example: user_12345
                                attributes:
                                  type: object
                                  example:
                                    planType: premium
                            agent:
                              type: object
                              nullable: true
                              properties:
                                id:
                                  type: string
                                  example: agent_1234567890
                                name:
                                  type: string
                                  example: Jane Smith
                                email:
                                  type: string
                                  example: jane@company.com
                                avatar:
                                  type: string
                                  example: https://example.com/avatar.jpg
                            lastMessageDate:
                              type: string
                              format: date-time
                              example: '2024-01-20T14:45:00Z'
                              description: Date of the last message (any sender)
                            lastVisitorMessageDate:
                              type: string
                              format: date-time
                              nullable: true
                              example: '2024-01-20T14:30:00Z'
                              description: Date of the last message from visitor
                            lastBotMessageDate:
                              type: string
                              format: date-time
                              nullable: true
                              example: '2024-01-20T14:45:00Z'
                              description: Date of the last message from AI bot
                            lastAgentMessageDate:
                              type: string
                              format: date-time
                              nullable: true
                              example: '2024-01-19T10:00:00Z'
                              description: Date of the last message from human agent
                            createdAt:
                              type: string
                              format: date-time
                              example: '2024-01-15T10:30:00Z'
                            updatedAt:
                              type: string
                              format: date-time
                              example: '2024-01-20T14:45:00Z'
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 150
                            description: Total number of conversations
                          perPage:
                            type: integer
                            example: 20
                            description: Number of records per page
                          currentPage:
                            type: integer
                            example: 1
                            description: Current page number
                          totalPages:
                            type: integer
                            example: 8
                            description: Total number of pages
        '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

````