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

# Fetch call history

> Return paginated call history for a single workspace, including agent and workspace metadata plus optional search and date filters.



## OpenAPI

````yaml /openapi.json get /api/v1/calls/history
openapi: 3.1.0
info:
  title: UponAI Platform API
  version: '2026-04-20'
  description: >-
    Programmatic control plane for configuring UponAI agents, LLM
    configurations, conversation flows, knowledge bases, calls, chats, voices,
    and test tooling. All endpoints require a bearer token obtained from your
    profile settings.
servers:
  - url: https://api.upon-ai.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Calls
    description: Initiate and manage UponAI powered voice and web calls.
  - name: Agents
    description: Configure agents that power calls and web sessions.
  - name: LLM Models
    description: Manage reusable large language model configurations for agents.
  - name: Chat Agents
    description: Configure agents for browser and messaging chat sessions.
  - name: Chats
    description: Start and manage live chat sessions.
  - name: Conversation Flows
    description: Build and maintain reusable dialog graphs for agents.
  - name: Knowledge Bases
    description: Store and curate grounded knowledge sources.
  - name: Voices
    description: Discover, search, add, and clone speech synthesis voices.
  - name: Test Case Definitions
    description: Define simulation test cases for response engines.
  - name: Test Runs
    description: Retrieve results for individual and batch test runs.
  - name: Account
    description: Account level utilities and limits.
  - name: Phone Numbers
    description: List and assign phone numbers to agents.
paths:
  /api/v1/calls/history:
    get:
      tags:
        - Calls
      summary: Fetch call history
      description: >-
        Return paginated call history for a single workspace, including agent
        and workspace metadata plus optional search and date filters.
      parameters:
        - $ref: '#/components/parameters/WorkspaceIdQuery'
        - $ref: '#/components/parameters/AgentIdQuery'
        - name: agentVersion
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Filter call history to a specific persisted agent version captured
            at call time.
        - $ref: '#/components/parameters/StatusQuery'
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: >-
            Search by call SID, phone number, platform call ID, customer name,
            or agent name.
        - $ref: '#/components/parameters/FromDateQuery'
        - $ref: '#/components/parameters/ToDateQuery'
        - $ref: '#/components/parameters/PageQuery'
        - $ref: '#/components/parameters/LimitQueryDefault20'
        - name: includeArchived
          in: query
          required: false
          schema:
            type: boolean
          description: When true, include archived calls in the response.
        - name: includeChildCalls
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            When true, include child calls linked to transfer or split-call
            workflows.
        - $ref: '#/components/parameters/XActorType'
        - $ref: '#/components/parameters/XProviderId'
        - $ref: '#/components/parameters/XTenantId'
        - $ref: '#/components/parameters/XImpersonationReason'
      responses:
        '200':
          description: Paginated call history.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallHistoryList'
              examples:
                default:
                  value:
                    success: true
                    calls:
                      - callSid: call_123abc
                        callStatus: ended
                        agentId: agent_456def
                        agentVersion: 2
                        agentName: Concierge
                        workspaceId: 42
                        workspaceName: Demo Workspace
                        fromNumber: '+14155550100'
                        toNumber: '+14155550199'
                        direction: outbound
                        customerName: Jane Doe
                        duration: 214
                        startedAt: '2026-03-12T14:22:00.000Z'
                        recordingUrl: https://cdn.example.com/recordings/call_123abc.mp3
                        sentiment: positive
                        summary: Customer confirmed an appointment for Friday.
                        costs:
                          voice: 0.09
                          llm: 0.03
                          gross: 0.12
                          total: 0.15
                    pagination:
                      page: 1
                      limit: 20
                      total: 184
                      pages: 10
components:
  parameters:
    WorkspaceIdQuery:
      name: workspaceId
      in: query
      required: true
      schema:
        type: integer
      description: >-
        Workspace identifier. Call GET /api/workspaces to list workspaces
        accessible to your token.
    AgentIdQuery:
      name: agentId
      in: query
      required: false
      schema:
        type: string
      description: Filter call listings to a specific agent.
    StatusQuery:
      name: status
      in: query
      required: false
      schema:
        type: string
      description: Filter calls by status.
    FromDateQuery:
      name: fromDate
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: Inclusive start date for call listing filter.
    ToDateQuery:
      name: toDate
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: Inclusive end date for call listing filter.
    PageQuery:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
    LimitQueryDefault20:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Page size for list endpoints.
    XActorType:
      name: X-Actor-Type
      in: header
      required: false
      schema:
        type: string
        enum:
          - platform_admin
          - provider_admin
          - tenant_admin
          - end_user
      description: Optional actor type for privileged white-label context selection.
    XProviderId:
      name: X-Provider-Id
      in: header
      required: false
      schema:
        type: integer
      description: Optional provider scope identifier for privileged multi-tenant access.
    XTenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: Optional tenant/workspace context override.
    XImpersonationReason:
      name: X-Impersonation-Reason
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required for privileged tenant-scoped requests when actor type is
        platform or provider admin.
  schemas:
    CallHistoryList:
      type: object
      properties:
        success:
          type: boolean
        calls:
          type: array
          items:
            $ref: '#/components/schemas/CallHistoryItem'
        pagination:
          type: object
          properties:
            page:
              type: integer
            limit:
              type: integer
            total:
              type: integer
            pages:
              type: integer
        filters:
          type: object
    CallHistoryItem:
      type: object
      properties:
        callSid:
          type: string
        callStatus:
          type: string
        agentId:
          type: string
        agentVersion:
          type: integer
        agentName:
          type: string
        workspaceId:
          type: integer
        workspaceName:
          type: string
        fromNumber:
          type: string
          nullable: true
        toNumber:
          type: string
          nullable: true
        direction:
          type: string
          enum:
            - inbound
            - outbound
        customerName:
          type: string
          nullable: true
        duration:
          type: integer
          nullable: true
        startedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        recordingUrl:
          type: string
          format: uri
          nullable: true
        sentiment:
          type: string
          nullable: true
        summary:
          type: string
          nullable: true
        voiceModel:
          type: string
          nullable: true
        llmModel:
          type: string
          nullable: true
        telecommunicationsProvider:
          type: string
          nullable: true
        carrierSid:
          type: string
          nullable: true
        carrierName:
          type: string
          nullable: true
        archived:
          type: boolean
        costs:
          $ref: '#/components/schemas/CallCosts'
    CallCosts:
      type: object
      properties:
        voice:
          type: number
        llm:
          type: number
        voiceMarkup:
          type: number
        llmMarkup:
          type: number
        gross:
          type: number
        markup:
          type: number
        total:
          type: number
        markupRate:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Generate tokens from your profile settings at app.uponai.com.

````