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

# List conversations

> Calls and chats in the project as one list, most recent start first. A conversation is listed once it is recorded: a call when it connects, a chat when it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds both.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/conversation
openapi: 3.1.0
info:
  title: Roark Analytics API
  description: >-
    The Roark Analytics API gives you access to the same API that powers the
    award winning Roark Analytics platform.
  version: 1.0.0
servers:
  - description: Production
    url: https://api.roark.ai
security:
  - Bearer: []
tags:
  - name: Agent
  - name: Customer
  - name: Agent Endpoint
  - name: Tool
  - name: Phone Number
  - name: Call
  - name: Chat
  - name: Conversation
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Customer Flow
  - name: Customer Flow Edge Case
  - name: Simulation
  - name: Simulation Persona
  - name: Simulation Environment
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Template
  - name: Simulation Audio Clip
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Autoimprove
  - name: Agent Config
  - name: Knowledge Base
  - name: Calendar Integration
  - name: MCP Server Integration
  - name: Config
  - name: Organization Project
  - name: Organization Project Member
  - name: Organization Project API Key
  - name: Organization Config
  - name: CLI Auth
  - name: Me
  - name: Project
  - name: Usage
  - name: Analytics
  - name: Dashboard
  - name: Live Report
  - name: Benchmark
  - name: Health
  - name: Campaign Credit
paths:
  /v1/conversation:
    get:
      tags:
        - Conversation
      summary: List conversations
      description: >-
        Calls and chats in the project as one list, most recent start first. A
        conversation is listed once it is recorded: a call when it connects, a
        chat when it ends. Listing calls needs `call:read`, chats `chat:read`,
        and both kinds both.
      operationId: getV1Conversation
      parameters:
        - in: query
          name: modality
          schema:
            type: string
            enum:
              - voice
              - chat
              - call
            description: Only `voice`, or only `chat`. Both by default.
        - in: query
          name: startedFrom
          schema:
            type: string
            format: date-time
            description: Only conversations that started at or after this time.
        - in: query
          name: startedTo
          schema:
            type: string
            format: date-time
            description: Only conversations that started at or before this time.
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: How many to return (default 20, max 100).
        - in: query
          name: after
          schema:
            type: string
            description: The `nextCursor` of the previous page.
      responses:
        '200':
          description: A page of conversations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationList'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Validation error
              example:
                type: validation
                code: invalid_parameter
                message: The request was invalid
                param: email
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Permission error
              example:
                type: forbidden
                code: permission_denied
                message: You do not have permission to access this resource
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Server error
              example:
                type: internal
                code: internal_error
                message: Internal server error
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Roark from '@roarkanalytics/sdk';

            const client = new Roark({
              bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
            });

            const conversations = await client.conversation.list();

            console.log(conversations.data);
        - lang: Python
          source: |-
            import os
            from roark_analytics import Roark

            client = Roark(
                bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),  # This is the default and can be omitted
            )
            conversations = client.conversation.list()
            print(conversations.data)
components:
  schemas:
    ConversationList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Conversation'
        pagination:
          type: object
          properties:
            total:
              type: number
              description: Total number of items
            hasMore:
              type: boolean
              description: Whether there are more items to fetch
            nextCursor:
              type:
                - string
                - 'null'
              description: Cursor for the next page of items
          required:
            - total
            - hasMore
            - nextCursor
      required:
        - data
        - pagination
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - payment_required
            - rate_limit
            - internal
          description: The error type category
          examples:
            - validation
            - authentication
        code:
          type: string
          description: Machine-readable error code identifier
          examples:
            - invalid_parameter
            - missing_required_field
            - unauthorized
        message:
          type: string
          description: Human-readable error message
          examples:
            - The request was invalid
            - Authentication required
        param:
          type: string
          description: The parameter that caused the error (if applicable)
          examples:
            - email
            - user_id
        details:
          description: Additional error context information
      required:
        - type
        - code
        - message
    Conversation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The conversation id: its call id or chat id. `modality` says which,
            and where to read its transcript and metrics (`/v1/call/{callId}` or
            `/v1/chat/{id}`).
        projectId:
          type: string
          format: uuid
        modality:
          type: string
          enum:
            - voice
            - chat
          description: >-
            `voice` or `chat`. A voice conversation is recorded as a call
            (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
          example: voice
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - ENDED
          description: >-
            `PENDING` until it starts (a call ringing, a chat nobody has joined
            yet), `IN_PROGRESS`, then `ENDED`.
          example: ENDED
        title:
          type:
            - string
            - 'null'
        summary:
          type:
            - string
            - 'null'
        startedAt:
          type: string
          description: When it started, or was created while pending (ISO 8601).
        endedAt:
          type:
            - string
            - 'null'
          description: When it ended (ISO 8601). Null until it ends.
        durationMs:
          type:
            - integer
            - 'null'
          description: How long it ran. Null until it ends.
        externalId:
          type:
            - string
            - 'null'
          description: Your own id for it, if one was given.
        createdAt:
          type: string
      required:
        - id
        - projectId
        - modality
        - status
        - title
        - summary
        - startedAt
        - endedAt
        - durationMs
        - externalId
        - createdAt
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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