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

# Create phone call

> Initiate a PSTN phone call via UponAI infrastructure. The workspace is inferred from the unique agentId. You may still send workspaceId for backward compatibility. Native-transfer workspaces expose the full per-call override surface, including agentOverride, overrideAgentVersion, customSipHeaders, and ignoreE164Validation.



## OpenAPI

````yaml /openapi.json post /api/v1/calls/initiate
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/initiate:
    post:
      tags:
        - Calls
      summary: Create phone call
      description: >-
        Initiate a PSTN phone call via UponAI infrastructure. The workspace is
        inferred from the unique agentId. You may still send workspaceId for
        backward compatibility. Native-transfer workspaces expose the full
        per-call override surface, including agentOverride,
        overrideAgentVersion, customSipHeaders, and ignoreE164Validation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePhoneCallRequest'
            examples:
              default:
                value:
                  agentId: agent_01hzexample
                  fromNumber: '334'
                  toNumber: '+14155550199'
                  trunkName: Main Sales Trunk
                  customerName: Jamie Doe
                  ignoreE164Validation: true
                  overrideAgentVersion: 3
                  customSipHeaders:
                    X-Campaign: spring-renewal
                    X-Case-Id: case_123
                  metadata:
                    customerId: cust_123
                    campaign: renewal
                  uponai_dynamic_variables:
                    customer_name: Jamie
                    plan_tier: enterprise
                  agentOverride:
                    agent:
                      voiceId: elevenlabs-morgan
                      maxCallDurationMs: 900000
                    llm:
                      model: gpt-4.1
                      beginMessage: Hello Jamie, this is the virtual team from UponAI.
      responses:
        '201':
          description: Call initiation response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePhoneCallResponse'
components:
  schemas:
    CreatePhoneCallRequest:
      type: object
      required:
        - agentId
        - fromNumber
        - toNumber
      properties:
        agentId:
          type: string
        fromNumber:
          type: string
        toNumber:
          type: string
        trunkName:
          type: string
        customerName:
          type: string
        ignoreE164Validation:
          type: boolean
        overrideAgentVersion:
          type: integer
        customSipHeaders:
          type: object
          additionalProperties:
            type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        uponai_dynamic_variables:
          type: object
          additionalProperties:
            type: string
        agentOverride:
          type: object
          properties:
            agent:
              type: object
            llm:
              type: object
    CreatePhoneCallResponse:
      type: object
      properties:
        success:
          type: boolean
        call_sid:
          type: string
        call:
          $ref: '#/components/schemas/CallDetail'
    CallDetail:
      type: object
      properties:
        success:
          type: boolean
        call:
          $ref: '#/components/schemas/CallRecord'
    CallRecord:
      type: object
      properties:
        callId:
          type: string
        callType:
          type: string
        status:
          type: string
        agentId:
          type: string
        agentVersion:
          type: integer
        metadata:
          type: object
          additionalProperties:
            type: string
        optOutSensitiveDataStorage:
          type: boolean
        accessToken:
          type: string
          nullable: true
        expiresAt:
          type: string
          format: date-time
          nullable: true
        webCallUrl:
          type: string
          format: uri
          nullable: true
        uponai_dynamic_variables:
          type: object
          additionalProperties:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Generate tokens from your profile settings at app.uponai.com.

````