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

# List all conversations

> Returns all conversations matching filters.



## OpenAPI

````yaml GET /v1/{account_id}/{project_id}/conversations
openapi: 3.0.1
info:
  title: PolyAI Conversation API (v1)
  description: Schema for the PolyAI Conversations API – v1 get-conversations endpoint.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.us-1.platform.polyai.app
    description: US base url
  - url: https://api.uk-1.platform.polyai.app
    description: UK base url
  - url: https://api.euw-1.platform.polyai.app
    description: EUW base url
security:
  - ApiKeyAuth: []
paths:
  /v1/{account_id}/{project_id}/conversations:
    get:
      description: Returns all conversations matching filters.
      parameters:
        - name: account_id
          in: path
          description: Account ID.
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          description: Project ID.
          required: true
          schema:
            type: string
        - name: client_env
          in: query
          description: Client environment – sandbox, pre-release or live.
          schema:
            type: string
            enum:
              - sandbox
              - pre-release
              - live
            default: live
          example: sandbox
        - name: start_time
          in: query
          description: >-
            Start of the time range of the conversations to get, in ISO8601
            format.
          example: '2021-07-01T14:15:00.000Z'
          required: false
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          description: >-
            End of the time range of the conversations to get, in ISO8601
            format.
          example: '2021-07-01T16:35:00.000Z'
          required: false
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          description: >-
            Max number of conversations to return per API call. If the result
            set is larger than this, it will be paginated.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 5000
            default: 5
        - name: offset
          in: query
          description: Offset within the result set to fetch.
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: variant_id
          in: query
          description: >-
            Return all conversations under this variant_id. You may specify
            either variant_id or variant_name, not both.
          required: false
          schema:
            type: string
        - name: variant_name
          in: query
          description: >-
            Return all conversations under this variant_name. You may specify
            either variant_id or variant_name. Encode spaces as "%20".
          required: false
          schema:
            type: string
        - name: in_progress
          in: query
          description: >-
            If false, only return finished conversations. If true, only return
            conversations still in progress. If omitted, return all
            conversations.
          required: false
          schema:
            type: boolean
          example: false
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                properties:
                  conversations:
                    type: array
                    description: >-
                      Array of conversations returned in ascending chronological
                      order.
                    items:
                      $ref: '#/components/schemas/Conversation'
                  descriptions:
                    type: object
                    description: Dictionary of response keys and their descriptions.
                    properties:
                      conversations:
                        type: object
                        description: >-
                          Dictionary of Conversation object keys and their
                          descriptions.
                  next_offset:
                    type: integer
                    description: >-
                      If present, the result is paginated. Pass this value as
                      `offset` in the next request to fetch the next page.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Conversation:
      type: object
      properties:
        id:
          type: string
          description: Unique ID for this conversation.
          example: CAabcd1234567abcdef1250065d4fc7389
        account_id:
          type: string
          description: ID of the customer account this conversation is under.
        project_id:
          type: string
          description: ID of the project this conversation is under.
        variant_id:
          type: string
          description: ID of the variant this conversation is in.
        variant_name:
          type: string
          description: Name of the variant this conversation is in.
        environment:
          type: string
          description: Deployment environment. Usually `live`, `sandbox`, or `pre-release`.
        started_at:
          type: string
          format: date-time
          description: Time when the conversation began, in ISO8601 format.
        channel:
          type: string
          description: Medium of the conversation, e.g. `CHAT` or `VOICE-SIP`.
        from_number:
          type: string
          description: Caller’s phone number.
        to_number:
          type: string
          description: Phone number of the agent the caller was connected to.
        in_progress:
          type: boolean
          description: >-
            If true, the call is still in progress and its properties may
            change.
        num_turns:
          type: integer
          description: Number of turns in the conversation.
        total_duration:
          type: integer
          description: Duration of the entire call, in seconds.
        polyai_duration:
          type: integer
          description: Duration of the portion handled by the PolyAI agent, in seconds.
        handoff:
          type: boolean
          description: Whether the agent handed the call off.
        handoff_reason:
          type: string
          description: Brief reason why the agent handed the call off.
        handoff_destination:
          type: string
          description: If multiple destinations exist, which one was used.
        num_silences:
          type: integer
          description: Number of silence turns.
        num_ood:
          type: integer
          description: Number of Out-of-Domain turns.
        metrics:
          type: object
          description: Mapping of metric name -> value(s).
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
                minItems: 2
          example:
            CALL_DURATION: '30'
            CALL_TURN:
              - '2022-02-18T12:09:05.12677Z'
              - '2022-02-18T12:09:17.90602Z'
              - '2022-02-18T12:09:29.57732Z'
              - '2022-02-18T12:09:35.36996Z'
        state:
          type: object
          description: Mapping of keys -> values written to the dialogue state.
        turns:
          type: array
          description: Ordered list of turns in the conversation.
          items:
            $ref: '#/components/schemas/ConversationTurn'
      required:
        - id
        - account_id
        - project_id
        - environment
        - started_at
        - channel
        - in_progress
    ConversationTurn:
      type: object
      description: Info about a single turn.
      properties:
        user_input:
          type: string
          description: >-
            Transcription of what the user spoke or typed. May be an empty
            string when no input is present.
        user_input_dtmf:
          type: string
          description: >-
            DTMF digits captured for this turn. May be an empty string when none
            were entered.
        user_input_datetime:
          type: string
          format: date-time
          description: Time when the agent received the user's input.
        agent_response:
          type: string
          description: >-
            Transcription of the agent's response. May be an empty string when
            no response was produced.
        agent_response_datetime:
          type: string
          format: date-time
          description: Time when the agent responded.
        latency:
          type: number
          description: Agent latency for this turn in seconds.
        translated_user_input:
          type: string
          description: >-
            User input translated into the agent's working language if
            translation is enabled. Empty string when not applicable.
        english_agent_response:
          type: string
          description: >-
            Agent response in English when translation is enabled. Empty string
            when not applicable.
        intents:
          type: array
          description: List of intents found in this turn's input.
          items:
            type: string
        entities:
          type: array
          description: List of entities found in this turn's input.
          items:
            type: object
            description: Mapping entity name -> value(s).
            additionalProperties:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
        is_ood:
          type: boolean
          description: Whether the turn is classified as Out of Domain (OOD).
        is_silence:
          type: boolean
          description: Whether the turn is classified as a silence.
    Error:
      type: object
      properties:
        error_message:
          description: Reason for error.
          type: string
  responses:
    BadRequest:
      description: Bad Request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````