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

# List conversations

> Returns conversations for your organization, **newest first**, as a plain JSON array.

**Pagination.** Results are cursor-based and walk backwards in time. Take the `created_at` of the last item, Base64-encode that timestamp, and pass it as `cursor` to fetch older conversations. Stop when a page returns fewer than `limit` items.

**Field visibility** depends on your token's role — read-only tokens receive a reduced set of fields. Requires a token with read access.



## OpenAPI

````yaml /openapi.json get /core/conversations
openapi: 3.0.3
info:
  title: AnyReach API
  version: 1.0.0
  description: REST API for the AnyReach platform.
servers:
  - url: https://api.anyreach.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Conversations
    description: >-
      Create, list, retrieve, and message conversations between your users and
      AnyReach agents.
paths:
  /core/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        Returns conversations for your organization, **newest first**, as a
        plain JSON array.


        **Pagination.** Results are cursor-based and walk backwards in time.
        Take the `created_at` of the last item, Base64-encode that timestamp,
        and pass it as `cursor` to fetch older conversations. Stop when a page
        returns fewer than `limit` items.


        **Field visibility** depends on your token's role — read-only tokens
        receive a reduced set of fields. Requires a token with read access.
      operationId: listConversations
      parameters:
        - name: direction
          in: query
          schema:
            $ref: '#/components/schemas/Direction'
          description: Filter by direction.
        - name: channel
          in: query
          schema:
            $ref: '#/components/schemas/Channel'
          description: Filter by channel.
        - name: status
          in: query
          schema:
            $ref: '#/components/schemas/Status'
          description: Filter by status.
        - name: user_id
          in: query
          schema:
            type: string
          description: Filter by user ID (partial match).
        - name: agent_id
          in: query
          schema:
            type: string
          description: Filter by agent ID.
        - name: agent_version_id
          in: query
          schema:
            type: string
          description: Filter by agent version ID.
        - name: agent_number
          in: query
          schema:
            type: string
          description: Filter by agent phone number (partial match).
        - name: web_widget_id
          in: query
          schema:
            type: string
          description: Filter by web widget ID.
        - name: duration_above
          in: query
          schema:
            type: integer
          description: Only conversations lasting at least this many seconds.
        - name: duration_below
          in: query
          schema:
            type: integer
          description: Only conversations lasting at most this many seconds.
        - name: user_turn_count_above
          in: query
          schema:
            type: integer
          description: Only conversations with at least this many user turns.
        - name: user_turn_count_below
          in: query
          schema:
            type: integer
          description: Only conversations with at most this many user turns.
        - name: custom_metadata
          in: query
          schema:
            type: string
          description: >-
            Match against attached metadata. Must be a JSON object string, e.g.
            {"order_id":"123"}.
        - name: created_after
          in: query
          schema:
            type: string
            format: date-time
          description: Conversations created on or after this time.
        - name: created_before
          in: query
          schema:
            type: string
            format: date-time
          description: Conversations created on or before this time.
        - name: updated_after
          in: query
          schema:
            type: string
            format: date-time
          description: Conversations updated on or after this time.
        - name: updated_before
          in: query
          schema:
            type: string
            format: date-time
          description: Conversations updated on or before this time.
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          description: Maximum number of conversations to return.
        - name: cursor
          in: query
          schema:
            type: string
          description: >-
            Base64-encoded pagination cursor (the ISO 8601 created_at of the
            last item from the previous page).
        - name: columns
          in: query
          schema:
            type: string
          description: Comma-separated list of fields to return, e.g. id,status,created_at.
      responses:
        '200':
          description: A list of conversations.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Conversation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    Direction:
      type: string
      enum:
        - inbound
        - outbound
      description: Who initiated the conversation.
    Channel:
      type: string
      enum:
        - telephone
        - webrtc
        - email
        - text
      description: The conversation channel.
    Status:
      type: string
      enum:
        - token_created
        - triggered
        - ringing
        - in_progress
        - completed
        - failed
        - cancelled
        - transferred
        - unanswered
      description: Current state of the conversation.
    Conversation:
      type: object
      description: >-
        Fields marked sensitive are only returned to tokens whose role grants
        access to them.
      properties:
        id:
          type: string
          description: Unique conversation ID.
        organization_id:
          type: string
          description: Your organization ID.
        direction:
          $ref: '#/components/schemas/Direction'
        channel:
          $ref: '#/components/schemas/Channel'
        status:
          $ref: '#/components/schemas/Status'
        user_id:
          type: string
          description: The end user's identifier (a phone number for telephony).
        agent_id:
          type: string
          description: The agent handling the conversation.
        agent_version_id:
          type: string
          description: The specific agent version in use.
        agent_number:
          type: string
          description: The agent's phone number (telephony).
        web_widget_id:
          type: string
          nullable: true
          description: The web widget that originated the conversation, if any.
        duration:
          type: integer
          nullable: true
          description: Conversation length in seconds.
        user_turn_count:
          type: integer
          nullable: true
          description: Number of user turns.
        created_at:
          type: string
          format: date-time
          description: Creation timestamp.
        updated_at:
          type: string
          format: date-time
          description: Last-update timestamp.
        agent:
          type: object
          description: Sensitive. The handling agent.
          properties:
            id:
              type: string
            name:
              type: string
        summary:
          type: string
          description: Sensitive. Generated conversation summary.
        initial_context:
          type: string
          description: >-
            Sensitive. Context injected into the agent at the start of the
            conversation.
        custom_metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Sensitive. Metadata you attached when creating the conversation.
        conversation:
          type: object
          additionalProperties: true
          nullable: true
          description: Sensitive. The transcript.
        recording_details:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            Sensitive. Recording information, including a time-limited
            recording_url.
    Error:
      type: object
      properties:
        detail:
          type: string
          description: A human-readable description of the error.
          example: Conversation not found
  responses:
    BadRequest:
      description: >-
        The request was understood but could not be fulfilled (e.g. a referenced
        agent version is not published, or a usage limit was reached).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token's role doesn't grant access to this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal access token. See Authentication.

````