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

# Get AI Sessions

> Get AI conversation sessions with optional messages and state/resolution data



## OpenAPI

````yaml GET /ai-sessions
openapi: 3.0.1
info:
  title: Konvo API
  description: Access to your contact, broadcast, attribution & clicks data
  license:
    name: MIT
  version: 0.0.1
servers:
  - url: https://api.konvoai.com
security:
  - apiKeyAuth: []
paths:
  /ai-sessions:
    get:
      description: >-
        Get AI conversation sessions with optional messages and state/resolution
        data
      parameters:
        - name: page
          in: query
          description: Pointer for the current page of the paginated query
          schema:
            type: integer
            format: int32
        - name: limit
          in: query
          description: The maximum number of results to return, maximum is 200
          schema:
            type: integer
            format: int32
        - name: updated_at_min
          in: query
          description: Filter by sessions created after a certain date
          schema:
            type: string
            format: date-time
        - name: updated_at_max
          in: query
          description: Filter by sessions created before a certain date
          schema:
            type: string
            format: date-time
        - name: messages
          in: query
          description: >-
            Set to true to include the text messages exchanged in each session
            (tool calls are excluded)
          schema:
            type: boolean
            default: false
        - name: state
          in: query
          description: >-
            Set to true to include the session status (resolved/unresolved) and
            AI state (skill type, trail)
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Get AI sessions response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AISessionResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AISessionResponse:
      type: object
      properties:
        count:
          description: Total count of sessions matching the query
          type: integer
        result:
          description: Resulting query
          type: array
          items:
            $ref: '#/components/schemas/AISession'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    AISession:
      properties:
        id:
          type: string
          description: Unique session identifier
          example: 2eac78c7-ef64-49cb-82f0-7280b555f015
        workspace_id:
          type: string
          description: Workspace the session belongs to
          example: 465d610c-43df-4c87-8396-8eb9742122c4
        feed_id:
          type: string
          description: Conversation feed ID
          example: 6bdda998-40a0-4f61-9e7d-ca7f4879b13d
        contact_id:
          type: string
          description: Contact ID associated with the session
          example: f1349acb-b4d4-4220-b90a-36ef170ddd4a
        external_user_id:
          type: string
          description: External user identifier (e.g. phone number)
          example: '4915142424351'
        channel:
          type: string
          description: Communication channel
          example: whatsapp
          enum:
            - whatsapp
            - live_chat
            - email
            - instagram
        created_at:
          type: string
          description: When the session was created
          example: '2026-02-25T16:46:34.206Z'
        status:
          $ref: '#/components/schemas/AISessionStatus'
          description: Session resolution status. Only included when state=true
        state:
          $ref: '#/components/schemas/AISessionState'
          description: AI skill state. Only included when state=true
        messages:
          type: array
          description: >-
            Text messages in the session. Only included when messages=true. Tool
            calls are excluded.
          items:
            $ref: '#/components/schemas/AISessionMessageItem'
    AISessionStatus:
      type: object
      properties:
        session_id:
          type: string
          example: 2eac78c7-ef64-49cb-82f0-7280b555f015
        completed:
          type: boolean
          description: Whether the session has completed
          example: true
        unresolved:
          type: boolean
          description: Whether the session ended without resolution
          example: false
        completed_at:
          type: string
          description: When the session was completed
          example: '2026-02-25T16:50:00.000Z'
        last_message_date:
          type: string
          description: Timestamp of the last message in the session
          example: '2026-02-25T16:49:30.000Z'
        last_updated:
          type: string
          description: When the status was last updated
          example: '2026-02-25T16:50:00.000Z'
    AISessionState:
      type: object
      properties:
        session_id:
          type: string
          example: 2eac78c7-ef64-49cb-82f0-7280b555f015
        type:
          type: string
          description: The AI skill type handling the session
          example: CONCIERGE
        sub_intent_type:
          type: string
          description: Sub-intent classification
          example: CONCIERGE
        trail:
          type: array
          description: History of skill transitions during the session
          items:
            type: object
    AISessionMessageItem:
      type: object
      properties:
        message_id:
          type: string
          description: Unique message identifier
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        session_id:
          type: string
          description: Session this message belongs to
          example: 2eac78c7-ef64-49cb-82f0-7280b555f015
        initiator_origin:
          type: string
          description: Who sent the message
          example: RECIPIENT
          enum:
            - RECIPIENT
            - AI
        message:
          type: string
          description: The message text content
          example: Hi, I need help with my order
        created_at:
          type: string
          description: When the message was sent
          example: '2026-02-25T16:46:40.000Z'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````