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

# List Calls

> Retrieve all calls with optional filtering and pagination.



## OpenAPI

````yaml get /v1/calls
openapi: 3.1.0
info:
  title: OpenMic v1 External API
  description: >-
    API specification for OpenMic v1 External API, providing endpoints for bot
    management, call handling, and phone number operations.
  version: 1.0.0
servers:
  - url: https://api.openmic.ai
    description: Production Environment
security:
  - api_key: []
tags:
  - name: Calls
    description: Endpoints related to phone call creation and management.
  - name: Bots
    description: Endpoints related to bot management and configuration.
  - name: Phone Numbers
    description: Endpoints related to phone number management and bot linking.
  - name: Knowledge Bases
  - name: FAQs
  - name: Campaigns
  - name: Tools
  - name: Contact Lists
  - name: Contacts
  - name: Voices
    description: >-
      Endpoints for browsing available text-to-speech voices. Voices are
      read-only and can be filtered by gender, provider, language, and accent.
  - name: SMS
    description: Endpoints for sending SMS messages.
paths:
  /v1/calls:
    get:
      tags:
        - Calls
      summary: List Calls
      description: Retrieve all calls with optional filtering and pagination.
      parameters:
        - name: limit
          in: query
          description: Maximum number of calls to return (1-100)
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: offset
          in: query
          description: Number of calls to skip
          schema:
            type: integer
            minimum: 0
        - name: customer_id
          in: query
          description: Filter by customer ID
          schema:
            type: string
        - name: from_number
          in: query
          description: Filter by originating phone number
          schema:
            type: string
        - name: to_number
          in: query
          description: Filter by destination phone number
          schema:
            type: string
        - name: bot_uid
          in: query
          description: Filter by bot UID
          schema:
            type: string
        - name: from_date
          in: query
          description: Filter calls from this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: to_date
          in: query
          description: Filter calls to this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: call_status
          in: query
          description: Filter by call status
          schema:
            type: string
            enum:
              - registered
              - ongoing
              - ended
              - error
        - name: call_type
          in: query
          description: Filter by call type
          schema:
            type: string
            enum:
              - phonecall
              - webcall
      responses:
        '200':
          description: List of calls retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCallsResponse'
              example:
                calls:
                  - call_type: phonecall
                    from_number: '+1234567890'
                    to_number: '+0987654321'
                    direction: outbound
                    call_id: cmbbvrg8wzi487w02m2bc7dji
                    agent_id: bvrg8wzi487w02m2bc7dh0ev
                    call_status: ended
                    customer_id: customer_001
                    start_timestamp: 1678886400000
                    end_timestamp: 1678886700000
                    duration_ms: 300000
                    transcript:
                      - - assistant
                        - Hello! How can I help you today?
                      - - user
                        - I'd like to schedule an appointment.
                    recording_url: https://recordings.openmic.ai/call_98765.mp3
                    latency:
                      e2e_min_latency: 0.5
                      e2e_median_latency: 1.2
                      e2e_p90_latency: 2.1
                      llm_min_latency: 0.3
                      llm_median_latency: 0.8
                      llm_p90_latency: 1.5
                      tts_min_latency: 0.2
                      tts_median_latency: 0.4
                      tts_p90_latency: 0.6
                    call_analysis:
                      summary: >-
                        Customer called to schedule an appointment and was
                        successfully assisted.
                      is_successful: true
                      success_evaluation: excellent
                      extracted_data: null
                    call_cost:
                      total_cost: 0.0822
                      llm_cost: 0.0052548
                      tts_cost: 0.0242269
                      stt_cost: 0.0527183
                    dynamic_variables:
                      name: John
                pagination:
                  limit: 1
                  offset: 0
                  total: 1
                  has_more: false
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid query parameters provided.
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
                message: Invalid or expired API key
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: An unexpected error occurred. Please try again later.
components:
  schemas:
    ListCallsResponse:
      type: object
      properties:
        calls:
          type: array
          items:
            $ref: '#/components/schemas/CallResponse'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - calls
        - pagination
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Additional error message (for certain error types)
      required:
        - error
    CallResponse:
      type: object
      properties:
        call_type:
          type: string
          enum:
            - phonecall
            - webcall
          description: Type of call
        from_number:
          type: string
          description: Originating phone number
        to_number:
          type: string
          description: Destination phone number
        direction:
          type: string
          enum:
            - inbound
            - outbound
          description: Call direction
        call_id:
          type: string
          description: Unique call identifier
        agent_id:
          type: string
          description: Bot/agent identifier
        call_status:
          type: string
          enum:
            - registered
            - ongoing
            - ended
            - error
          description: Current call status
        customer_id:
          type: string
          description: Customer identifier
        telephony_identifier:
          type: object
          description: Telephony system identifiers
        start_timestamp:
          type: integer
          description: Call start time (Unix timestamp in milliseconds)
        end_timestamp:
          type: integer
          description: Call end time (Unix timestamp in milliseconds)
        duration_ms:
          type: integer
          description: Call duration in milliseconds
        transcript:
          type: array
          items:
            type: array
            items:
              type: string
            minItems: 2
            maxItems: 2
            description: Transcript entry with [speaker, message] format
          description: Call transcript as array of [speaker, message] pairs
        recording_url:
          type: string
          description: URL to call recording
        latency:
          type: object
          properties:
            e2e_min_latency:
              type: number
              description: Minimum end-to-end latency in seconds
            e2e_median_latency:
              type: number
              description: Median end-to-end latency in seconds
            e2e_p90_latency:
              type: number
              description: 90th percentile end-to-end latency in seconds
            llm_min_latency:
              type: number
              description: Minimum LLM processing latency in seconds
            llm_median_latency:
              type: number
              description: Median LLM processing latency in seconds
            llm_p90_latency:
              type: number
              description: 90th percentile LLM processing latency in seconds
            tts_min_latency:
              type: number
              description: Minimum text-to-speech latency in seconds
            tts_median_latency:
              type: number
              description: Median text-to-speech latency in seconds
            tts_p90_latency:
              type: number
              description: 90th percentile text-to-speech latency in seconds
          description: Latency metrics for different components
        call_analysis:
          type: object
          properties:
            summary:
              type: string
              description: AI-generated summary of the call
            is_successful:
              type: boolean
              description: Whether the call was deemed successful
            success_evaluation:
              type: string
              description: Success evaluation result (e.g., 'good', 'excellent', 'poor')
            extracted_data:
              type: object
              nullable: true
              description: >-
                Structured data extracted from the call based on post-call
                settings
          description: Post-call analysis results including summary and success metrics
        call_cost:
          type: object
          properties:
            total_cost:
              type: number
              description: Total cost of the call in USD
            llm_cost:
              type: number
              description: Cost attributed to LLM usage in USD
            tts_cost:
              type: number
              description: Cost attributed to text-to-speech in USD
            stt_cost:
              type: number
              description: Cost attributed to speech-to-text in USD
          description: Detailed cost breakdown for the call
        dynamic_variables:
          type: object
          example:
            name: John
          description: Send dynamic variables in key value pairs to replace in the prompt.
      required:
        - call_type
        - from_number
        - to_number
        - direction
        - call_id
        - agent_id
        - call_status
    Pagination:
      type: object
      properties:
        limit:
          type: integer
          description: Number of items per page
        offset:
          type: integer
          description: Number of items skipped
        total:
          type: integer
          description: Total number of items
        has_more:
          type: boolean
          description: Whether there are more items
      required:
        - limit
        - offset
        - total
        - has_more
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Include your API key in the Authorization header
        as: `Authorization: Bearer <your-api-key>`

````