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

# Dial Outbound Phone Call

> Initiate an outbound phone call from an AI agent to a specified phone number.

This endpoint triggers the AI agent to place a phone call to the provided number.
Use this for scenarios where the AI needs to proactively contact users via phone.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/calls/dial-outbound-phone-call
openapi: 3.1.0
info:
  title: Verbex Platform API
  description: API for managing AI agents, calls, phone numbers, and more.
  version: 1.0.0
servers: []
security: []
paths:
  /v1/calls/dial-outbound-phone-call:
    post:
      tags:
        - Calls
      summary: Dial Outbound Phone Call
      description: >-
        Initiate an outbound phone call from an AI agent to a specified phone
        number.


        This endpoint triggers the AI agent to place a phone call to the
        provided number.

        Use this for scenarios where the AI needs to proactively contact users
        via phone.
      operationId: dial_outbound_phone_call_v1_calls_dial_outbound_phone_call_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePhoneCallRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCallResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__calls__schemas__ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreatePhoneCallRequest:
      properties:
        call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Call Id
          description: >-
            Optional custom identifier for the call, if not provided, one will
            be generated
        from_number:
          type: string
          title: From Number
          description: The phone number initiating the call (E.164 format)
        to_number:
          type: string
          title: To Number
          description: The phone number receiving the call (E.164 format)
        override_ai_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Override Ai Agent Id
          description: >-
            Optional alternative AI agent identifier for special handling
            scenarios
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: Custom key-value pairs for storing call-specific information
        pia_llm_dynamic_data:
          anyOf:
            - type: object
            - type: 'null'
          title: Pia Llm Dynamic Data
          description: Dynamic data to be used by the AI agent during this call
        direction:
          type: string
          enum:
            - inbound
            - outbound
          title: Direction
          description: Specifies whether this is an incoming or outgoing call
      type: object
      required:
        - from_number
        - to_number
        - direction
      title: CreatePhoneCallRequest
    PhoneCallResponse:
      properties:
        _id:
          type: string
          title: Id
          description: >-
            Unique identifier for the call session, automatically generated as a
            MongoDB ObjectId
        ai_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Agent Id
          description: Identifier of the AI agent handling this call
        ai_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Agent Name
          description: Name of the AI agent handling this call
        call_status:
          type: string
          enum:
            - registered
            - ongoing
            - ended
            - error
          title: Call Status
          description: >-
            Current status of the call: 'registered' for initialized calls,
            'ongoing' for active calls, 'ended' for completed calls, 'error' for
            failed calls
        override_ai_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Override Ai Agent Id
          description: Optional identifier for an alternative AI agent handling this call
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: Custom key-value pairs storing additional information about the call
        pia_llm_dynamic_data:
          anyOf:
            - type: object
            - type: 'null'
          title: Pia Llm Dynamic Data
          description: Dynamic data used by the AI agent during the call
        call_start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Call Start Time
          description: Timestamp when the call was initiated, in UTC
        call_end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Call End Time
          description: Timestamp when the call was terminated, in UTC
        messages:
          anyOf:
            - items:
                $ref: '#/components/schemas/MessageItem'
              type: array
            - type: 'null'
          title: Messages
          description: Chronological list of messages exchanged during the call
        recorded_call_audio_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Recorded Call Audio Url
          description: URL to access the recorded audio file of the call
        access_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Access Token
          description: Security token for accessing call-related resources
        call_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Call Duration Seconds
          description: Duration of the call in seconds
        call_type:
          type: string
          const: phone_call
          title: Call Type
          description: Indicates this response is for a telephone call
          default: phone_call
        from_number:
          type: string
          title: From Number
          description: The phone number that initiated the call (E.164 format)
        to_number:
          type: string
          title: To Number
          description: The phone number that received the call (E.164 format)
        direction:
          type: string
          enum:
            - inbound
            - outbound
          title: Direction
          description: >-
            Indicates whether the call was received by or initiated from the Pia
            Platform
        call_finish_reason:
          anyOf:
            - type: string
              enum:
                - user_ended_call
                - agent_ended_call
                - call_transferred
                - voicemail_detected
                - inactivity_timeout
                - answering_machine_detected
                - maximum_duration_exceeded
                - concurrent_call_limit_reached
                - invalid_payment
                - potential_scam_detected
                - inbound_webhook_error
                - line_busy
                - call_failed
                - no_answer
                - llm_websocket_initialization_error
                - llm_websocket_connection_lost
                - llm_websocket_runtime_error
                - llm_websocket_payload_corruption
                - frontend_payload_corruption
                - twilio_service_error
                - no_audio_input
                - speech_recognition_error
                - verbex_service_error
                - unknown_error
                - user_connection_failure
                - registered_call_timed_out
            - type: 'null'
          title: Call Finish Reason
          description: Detailed reason why the phone call ended, if applicable
      type: object
      required:
        - call_status
        - from_number
        - to_number
        - direction
      title: PhoneCallResponse
    app__calls__schemas__ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: Error code identifying the type of error that occurred
        message:
          type: string
          title: Message
          description: Human-readable description of the error
      type: object
      required:
        - error
        - message
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MessageItem:
      properties:
        role:
          type: string
          enum:
            - agent
            - user
          title: Role
          description: >-
            Identifies whether the message is from the AI agent ('agent') or the
            human user ('user')
        content:
          type: string
          title: Content
          description: >-
            The actual text content of the message exchanged during the
            conversation
      type: object
      required:
        - role
        - content
      title: MessageItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````