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

# List conversations

> Returns calls and chats of your organization, newest first, one page at a time. Follow `next_cursor` for the next page. The response carries an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` when the first page has not changed. To search by text, use the search operation.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/conversations
openapi: 3.1.0
info:
  description: >-
    Manage your Klatt voice and chat agents, conversations, contacts and
    knowledge with an organization API key. Start with the
    [introduction](https://docs.klatt.ai/api-reference/introduction).
  title: Klatt API
  version: 1.0.0
servers:
  - url: https://api.klatt.ai
security:
  - bearerAuth: []
tags:
  - description: >-
      Agents that answer and place phone calls, and where they can transfer a
      call.
    name: Voice agents
  - description: Agents that answer WhatsApp chats.
    name: Chat agents
  - description: Calls and chats your agents have handled, with their analysis and state.
    name: Conversations
  - description: Lists of contacts and the custom fields each list defines.
    name: Contact lists
  - description: The people in a contact list.
    name: Contacts
  - description: Documents your agents read from, and their extracted text.
    name: Knowledge documents
  - description: >-
      Short question-and-answer and company-information entries your agents can
      use.
    name: Knowledge entries
paths:
  /api/v1/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        Returns calls and chats of your organization, newest first, one page at
        a time. Follow `next_cursor` for the next page. The response carries an
        `ETag`; send it back in `If-None-Match` to receive `304 Not Modified`
        when the first page has not changed. To search by text, use the search
        operation.
      operationId: listConversations
      parameters:
        - description: Maximum number of conversations to return, from 1 to 100.
          in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 100
            minimum: 1
            type: integer
        - description: >-
            Opaque cursor from the `next_cursor` of the previous page. Omit it
            to start from the newest conversation.
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - maxLength: 256
                type: string
              - type: 'null'
        - description: Only conversations on this channel, `voice` or `chat`.
          in: query
          name: channel
          required: false
          schema:
            anyOf:
              - enum:
                  - voice
                  - chat
                type: string
              - type: 'null'
        - description: >-
            Only conversations of these kinds: `call`, `chat` or `test`. Repeat
            the parameter to allow several.
          in: query
          name: kind
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - call
                    - chat
                    - test
                  type: string
                type: array
              - type: 'null'
        - description: >-
            Only conversations handled by these agents. Repeat the parameter to
            allow several.
          in: query
          name: agent_uuid
          required: false
          schema:
            anyOf:
              - items:
                  format: uuid
                  type: string
                type: array
              - type: 'null'
        - description: >-
            Only conversations changed after this date and time (ISO 8601, UTC).
            Use it to poll for updates.
          in: query
          name: since
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
        - description: >-
            Only conversations whose analysis has one of these results. Repeat
            the parameter to allow several.
          in: query
          name: category
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - TRANSFERRED
                    - CALLBACK_OR_OPEN
                    - RESOLVED_WITHOUT_TEAM
                    - ENDED_BY_CALLER
                    - NO_CLEAR_REQUEST
                    - silent
                    - unanalyzed
                    - caller-hungup-ringing
                  type: string
                type: array
              - type: 'null'
        - description: >-
            Only calls in this direction, `inbound` or `outbound`. Repeat the
            parameter to allow several.
          in: query
          name: direction
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - inbound
                    - outbound
                  type: string
                type: array
              - type: 'null'
        - description: >-
            Only conversations that belong to these outbound campaigns. Repeat
            the parameter to allow several.
          in: query
          name: campaign_uuid
          required: false
          schema:
            anyOf:
              - items:
                  format: uuid
                  type: string
                type: array
              - type: 'null'
        - description: >-
            Only conversations in these states: `unread`, `read` or `starred`.
            Repeat the parameter to allow several.
          in: query
          name: status
          required: false
          schema:
            anyOf:
              - items:
                  enum:
                    - unread
                    - read
                    - starred
                  type: string
                type: array
              - type: 'null'
        - description: When `true`, return archived conversations instead of active ones.
          in: query
          name: archived
          required: false
          schema:
            default: false
            type: boolean
        - description: >-
            Only conversations that started at or after this date and time (ISO
            8601 with a time zone).
          in: query
          name: date_from
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
        - description: >-
            Only conversations that started at or before this date and time (ISO
            8601 with a time zone).
          in: query
          name: date_to
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
        - description: Only calls lasting at least this many seconds.
          in: query
          name: duration_min
          required: false
          schema:
            anyOf:
              - maximum: 86400
                minimum: 0
                type: integer
              - type: 'null'
        - description: Only calls lasting at most this many seconds.
          in: query
          name: duration_max
          required: false
          schema:
            anyOf:
              - maximum: 86400
                minimum: 0
                type: integer
              - type: 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationFeedPage'
          description: Successful Response
          headers:
            ETag:
              description: >-
                Identifies this response. Send it back in the header named by
                the operation.
              schema:
                type: string
        '304':
          description: The first page has not changed since the `ETag` you sent.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            A filter refers to an agent or campaign that does not exist in your
            organization.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: The request failed validation.
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ConversationFeedPage:
      properties:
        items:
          description: The conversations of this page, newest first.
          items:
            $ref: '#/components/schemas/ConversationFeedItem'
          type: array
        latest_change_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: The most recent `updated_at` among the items (ISO 8601, UTC).
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Cursor to send as `cursor` to get the next page. `null` on the last
            page.
        totals:
          anyOf:
            - $ref: '#/components/schemas/FeedTotals'
            - type: 'null'
          description: Totals for the filters. Only present on the first page.
      required:
        - items
      type: object
    Error:
      description: Body of an error response.
      properties:
        detail:
          description: >-
            A stable error code such as `agent_not_found`. A few authentication
            errors carry a short text instead, such as `Invalid or expired API
            key`.
          type: string
        message:
          description: >-
            A human-readable explanation. Present only on errors raised before
            the request reaches the API, such as `api_key_wrong_host`.
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      description: 'Body of a `422` response: the request failed validation.'
      properties:
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationError'
              type: array
            - type: string
            - type: object
          description: >-
            A list of field errors when the body or a parameter is invalid, a
            string with an error code for some other refusals, or an object with
            a `code` when a knowledge limit is exceeded.
      type: object
    ConversationFeedItem:
      properties:
        agent_deleted:
          description: >-
            Whether the agent has since been deleted. The conversation stays
            available.
          type: boolean
        agent_name:
          description: Name of that agent.
          type: string
        agent_uuid:
          description: UUID of the agent that handled the conversation.
          type: string
        analysis:
          anyOf:
            - $ref: '#/components/schemas/FeedAnalysis'
            - type: 'null'
          description: Result of the automatic analysis. `null` until the analysis exists.
        archived:
          description: Whether the conversation is archived.
          type: boolean
        campaign:
          anyOf:
            - $ref: '#/components/schemas/FeedCampaign'
            - type: 'null'
          description: The outbound campaign the call belongs to. `null` otherwise.
        channel:
          description: '`voice` for calls, `chat` for WhatsApp chats.'
          enum:
            - voice
            - chat
          type: string
        contact_number:
          anyOf:
            - type: string
            - type: 'null'
          description: Phone number of the other party.
        conversation_uuid:
          description: Unique identifier (UUID) of the conversation.
          type: string
        direction:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            For calls: `inbound`, `outbound` or `browser` (a test in the
            console). `null` for chats.
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Length of the call in seconds. `null` for chats and calls that never
            started.
        ended_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the conversation ended (ISO 8601, UTC). `null` while it is in
            progress or for chats.
        ended_reason:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the conversation ended, when known.
        kind:
          description: >-
            `call` for real calls, `chat` for WhatsApp chats, `test` for tests
            made in the console.
          enum:
            - call
            - chat
            - test
          type: string
        occurred_at:
          description: >-
            When the conversation happened. The list is sorted by this value,
            newest first.
          format: date-time
          type: string
        read:
          description: Whether the conversation has been read.
          type: boolean
        starred:
          description: Whether the conversation is starred.
          type: boolean
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the conversation started (ISO 8601, UTC). `null` if it never
            started.
        status:
          description: >-
            Where the conversation stands. Chats are `open` or `closed`; calls
            use statuses such as `completed` or `failed`.
          type: string
        subject:
          anyOf:
            - type: string
            - type: 'null'
          description: Short subject written by the analysis.
        updated_at:
          description: When the conversation or its analysis last changed (ISO 8601, UTC).
          format: date-time
          type: string
      required:
        - conversation_uuid
        - channel
        - agent_uuid
        - agent_name
        - agent_deleted
        - status
        - occurred_at
        - updated_at
        - read
        - starred
        - archived
        - kind
      type: object
    FeedTotals:
      properties:
        by_day:
          description: The same count split by day.
          items:
            $ref: '#/components/schemas/FeedDayCount'
          type: array
        count:
          description: Number of conversations that match the filters, across all pages.
          type: integer
      required:
        - count
        - by_day
      type: object
    ValidationError:
      description: One invalid field of a request.
      properties:
        ctx:
          description: Extra details about the error, such as the limit that was exceeded.
          type: object
        input:
          description: The value that failed validation, when it is returned.
        loc:
          description: 'Where the error is: `body`, `query` or `path`, then the field names.'
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          description: What is wrong with the value.
          type: string
        type:
          description: A short code for the kind of error.
          type: string
      required:
        - loc
        - msg
        - type
      type: object
    FeedAnalysis:
      properties:
        caller_intent:
          anyOf:
            - type: string
            - type: 'null'
          description: What the person wanted, in a short phrase written by the analysis.
        category:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Result of the conversation: `TRANSFERRED`, `CALLBACK_OR_OPEN`,
            `RESOLVED_WITHOUT_TEAM`, `ENDED_BY_CALLER` or `NO_CLEAR_REQUEST`.
            `null` until it is known, and for a chat the team handled
            (`is_team_handled`).
        is_silent:
          description: >-
            Whether there was nothing to analyse: nobody spoke on a call, or a
            chat held only closing messages that needed no reply.
          type: boolean
        is_team_handled:
          default: false
          description: >-
            Whether the assistant never replied to this WhatsApp chat because
            the business's team handles it in the WhatsApp Business app
            (coexistence number). Such an analysis has no category or summary.
          type: boolean
        state:
          description: >-
            Progress of the analysis: `pending`, `running`, `completed` or
            `failed`.
          type: string
      required:
        - state
        - category
        - is_silent
        - caller_intent
      type: object
    FeedCampaign:
      properties:
        attempt_number:
          description: Which attempt of the campaign this call was, starting at 1.
          type: integer
        campaign_uuid:
          description: Unique identifier (UUID) of the campaign.
          type: string
        name:
          description: Name of the campaign.
          type: string
      required:
        - campaign_uuid
        - name
        - attempt_number
      type: object
    FeedDayCount:
      properties:
        count:
          description: Number of conversations on that day.
          type: integer
        day:
          description: Calendar day, in your organization's time zone.
          format: date
          type: string
      required:
        - day
        - count
      type: object
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The API key is missing, malformed, unknown, deleted or sent to the wrong
        host. `detail` is a code such as `api_key_required`,
        `console_token_not_accepted` or `api_key_wrong_host`, or a short text
        such as `Invalid or expired API key`. Keys do not expire.
      headers:
        WWW-Authenticate:
          description: Always `Bearer`.
          schema:
            type: string
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The key is valid but may not do this. `detail` is `permission_required`,
        `organization_deleted` or `Organization API keys cannot access this
        operation`.
    RateLimited:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: The key exceeded its request limit. `detail` is `rate_limited`.
      headers:
        Retry-After:
          description: Seconds to wait before sending the next request.
          schema:
            type: integer
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        A dependency the request needs is temporarily unavailable. `detail`
        names it, for example `rate_limit_unavailable` or
        `contacts_unavailable`. Retry with backoff.
  securitySchemes:
    bearerAuth:
      description: >-
        An organization API key created in the Klatt console, sent as
        `Authorization: Bearer <key>`. The key belongs to one organization.
      scheme: bearer
      type: http

````

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