> ## 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 calls

> Returns a paginated list of calls for the authenticated project.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/call
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: Agent Endpoint
  - name: Call
  - name: Chat
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Simulation Persona
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Knowledge Base
  - name: Call Analysis
  - name: Health
paths:
  /v1/call:
    get:
      tags:
        - Call
      summary: List calls
      description: Returns a paginated list of calls for the authenticated project.
      operationId: getV1Call
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: 'Maximum number of calls to return (default: 20, max: 100)'
            example: 20
        - in: query
          name: after
          schema:
            type: string
            description: >-
              Cursor for pagination - use the nextCursor value from a previous
              response
            example: >-
              eyJzb3J0VmFsdWUiOiIyMDI1LTAxLTE1VDEwOjAwOjAwLjAwMDAwMFoiLCJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9
        - in: query
          name: sortBy
          schema:
            type: string
            enum:
              - createdAt
              - startedAt
              - endedAt
              - duration
              - title
              - status
            default: createdAt
            description: 'Field to sort by (default: createdAt)'
            example: createdAt
        - in: query
          name: sortDirection
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: 'Sort direction (default: desc)'
            example: desc
        - in: query
          name: status
          schema:
            type: string
            enum:
              - RINGING
              - IN_PROGRESS
              - ENDED
            description: Filter by call status
            example: ENDED
        - in: query
          name: searchText
          schema:
            type: string
            description: Search text to filter calls by title, summary, or transcript
            example: billing inquiry
        - in: query
          name: simulationRunPlanJobId
          schema:
            type: string
            format: uuid
            description: >-
              Filter by simulation run plan job ID to get all calls from a
              specific simulation batch
            example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: List of calls
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique identifier for the call
                          example: 550e8400-e29b-41d4-a716-446655440000
                        projectId:
                          type: string
                          format: uuid
                          description: ID of the project this call belongs to
                          example: 660e8400-e29b-41d4-a716-446655440001
                        title:
                          type:
                            - string
                            - 'null'
                          description: Auto-generated title for the call based on content
                          example: Customer support inquiry
                        summary:
                          type:
                            - string
                            - 'null'
                          description: Auto-generated summary of the call conversation
                          example: Customer inquired about billing and payment options
                        status:
                          type:
                            - string
                            - 'null'
                          enum:
                            - RINGING
                            - IN_PROGRESS
                            - ENDED
                          description: Current status of the call
                          example: ENDED
                        callDirection:
                          type: string
                          enum:
                            - INBOUND
                            - OUTBOUND
                          description: Direction of the call (inbound or outbound)
                          example: INBOUND
                        startedAt:
                          type: string
                          description: Timestamp when the call started
                          example: '2024-01-15T10:00:00Z'
                        endedAt:
                          type:
                            - string
                            - 'null'
                          description: Timestamp when the call ended
                          example: '2024-01-15T10:30:00Z'
                        durationMs:
                          type:
                            - number
                            - 'null'
                          description: Duration of the call in milliseconds
                          example: 1800000
                        endedStatus:
                          type:
                            - string
                            - 'null'
                          enum:
                            - PARTICIPANTS_DID_NOT_SPEAK
                            - AGENT_DID_NOT_ANSWER
                            - AGENT_DID_NOT_SPEAK
                            - AGENT_STOPPED_SPEAKING
                            - AGENT_ENDED_CALL
                            - AGENT_TRANSFERRED_CALL
                            - AGENT_BUSY
                            - AGENT_ERROR
                            - CUSTOMER_ENDED_CALL
                            - VOICE_MAIL_REACHED
                            - SILENCE_TIME_OUT
                            - PHONE_CALL_PROVIDER_CONNECTION_ERROR
                            - CUSTOMER_DID_NOT_ANSWER
                            - CUSTOMER_DID_NOT_SPEAK
                            - CUSTOMER_STOPPED_SPEAKING
                            - CUSTOMER_BUSY
                            - DIAL_ERROR
                            - MAX_DURATION_REACHED
                            - UNKNOWN
                          description: Status indicating how the call ended
                          example: AGENT_ENDED_CALL
                        recordingUrl:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Pre-signed URL to the call recording (expires in 1
                            hour)
                          example: https://s3.amazonaws.com/bucket/recording.mp3?...
                        recordingUrlAccess:
                          type: string
                          enum:
                            - AVAILABLE
                            - NOT_AVAILABLE
                            - RESTRICTED
                          description: >-
                            Indicates the status of `recordingUrl`. `AVAILABLE`:
                            signed URL returned. `NOT_AVAILABLE`: no recording
                            on file yet (e.g. still processing). `RESTRICTED`:
                            the calling API key does not have the
                            `recording:read` permission and the URL has been
                            withheld.
                          example: AVAILABLE
                        simulationJobId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            ID of the simulation job if this call was generated
                            by a simulation
                          example: 880e8400-e29b-41d4-a716-446655440003
                        supersededByCallId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            ID of the call that superseded this one (if
                            applicable)
                          example: 990e8400-e29b-41d4-a716-446655440004
                        externalId:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Caller-supplied correlation ID echoed back from the
                            create request, if any was provided
                          example: session-abc-123
                        agents:
                          type:
                            - array
                            - 'null'
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              endpoint:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                  environment:
                                    type: string
                                  phoneNumberE164:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - id
                                  - environment
                            required:
                              - id
                          description: Agent information
                          example:
                            - id: 550e8400-e29b-41d4-a716-446655440000
                              endpoint:
                                id: 550e8400-e29b-41d4-a716-446655440000
                                environment: Production
                                phoneNumberE164: '+1234567890'
                        customers:
                          type:
                            - array
                            - 'null'
                          items:
                            type: object
                            properties:
                              phoneNumberE164:
                                type:
                                  - string
                                  - 'null'
                              label:
                                type:
                                  - string
                                  - 'null'
                          description: Customer information
                          example:
                            - phoneNumberE164: '+1234567891'
                              label: customer-01
                        createdAt:
                          type:
                            - string
                            - 'null'
                          description: Timestamp when the call record was created
                          example: '2024-01-15T10:31:00Z'
                        updatedAt:
                          type:
                            - string
                            - 'null'
                          description: Timestamp when the call record was last updated
                          example: '2024-01-15T10:31:00Z'
                        properties:
                          type:
                            - object
                            - 'null'
                          additionalProperties:
                            path: /v1/integrations/livekit-sdk/chunk-upload-url
                          description: Custom properties associated with the call
                          example:
                            ticketId: TCK-123
                            department: sales
                        policyIds:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                            format: uuid
                          description: >-
                            IDs of metric policies that have been applied to
                            this call
                          example:
                            - 550e8400-e29b-41d4-a716-446655440000
                      required:
                        - id
                        - projectId
                        - callDirection
                        - startedAt
                        - recordingUrlAccess
                      title: CallResponse
                      description: Response containing call information
                  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
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '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 calls = await client.call.list();

            console.log(calls.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
            )
            calls = client.call.list()
            print(calls.data)
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - 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
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````