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

> Create an AI phone agent powered by the latest voice model. Use when orchestrating voice calls programmatically — placing outbound calls or listing call history.

# Create an AI phone agent



## OpenAPI

````yaml post /phone
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /phone:
    post:
      summary: Create an AI phone agent
      description: >-
        Create an AI phone agent powered by the latest voice model. Use GET
        /phone/voices to browse available voices. Only name is required —
        everything else has sensible defaults.
      operationId: createPhoneAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePhoneAgentPublicDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneAgentDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    CreatePhoneAgentPublicDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/CreatePhoneAgentPublicDtoInput'
      type: object
      properties:
        name:
          type: string
          description: Agent display name
        type:
          description: >-
            Agent type: "inbound" (receives calls, default) or "outbound" (makes
            calls)
          type: string
          enum:
            - inbound
            - outbound
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Voice ID from the /phone/voices endpoint. Omit for default voice.
        language:
          description: >-
            ISO-639-1 language codes the agent should speak. A subset of {en,
            es, fr, de, hi, ru, pt, ja, it, nl} can be combined freely. Any
            other code (e.g. "ar", "tr", "zh") must be the only entry.
          minItems: 1
          type: array
          items:
            type: string
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          description: 'What the agent says when it picks up (default: "Hello?")'
        instructions:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Training scenario IDs to attach to this agent
        handoff_phone_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Phone number to transfer to when handing off to a human (E.164
            format)
        use_org_knowledgebase:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the agent can search your knowledge base during calls
            (default: false)
        actionIds:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Action IDs the agent can call during conversations
      required:
        - name
    PhoneAgentDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PhoneAgentDto'
      type: object
      properties:
        id:
          type: string
        org_id:
          type: string
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        type:
          type: string
          enum:
            - inbound
            - outbound
        language:
          type: array
          items:
            type: string
        accent:
          anyOf:
            - type: string
            - type: 'null'
        handoff_phone_number:
          anyOf:
            - type: string
            - type: 'null'
        speed:
          anyOf:
            - type: number
            - type: 'null'
        interruptible:
          type: boolean
        actionIds:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        instructions:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        data_collection_fields:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
        data_collection_webhook_url:
          anyOf:
            - type: string
            - type: 'null'
        model:
          type: string
          enum:
            - oppie-vox
            - oppie-vox-turbo
            - oppie-vox-2
            - oppie-vox-livekit
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
        first_message:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        provider_external_id:
          anyOf:
            - type: string
            - type: 'null'
        flow:
          anyOf:
            - {}
            - type: 'null'
        manual_mode:
          type: boolean
        custom_llm:
          anyOf:
            - type: string
            - type: 'null'
        use_org_knowledgebase:
          type: boolean
        background_noise_preset:
          anyOf:
            - type: string
              enum:
                - office
                - bar
                - city-street
            - type: 'null'
        recording_enabled:
          type: boolean
        stt_keyterms:
          type: array
          items:
            type: string
        stt_model:
          anyOf:
            - type: string
              enum:
                - deepgram/flux-general
                - deepgram/nova-3
                - deepgram/nova-3-medical
                - cartesia/ink-whisper
                - elevenlabs/scribe_v2_realtime
                - xai/stt-1
            - type: 'null'
        tts_speed_pct:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        failover_transfer_destination_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
      required:
        - id
        - org_id
        - phone_number
        - name
        - type
        - language
        - accent
        - handoff_phone_number
        - speed
        - interruptible
        - actionIds
        - instructions
        - data_collection_fields
        - data_collection_webhook_url
        - model
        - voice_id
        - first_message
        - created_at
        - updated_at
        - provider_external_id
        - flow
        - manual_mode
        - custom_llm
        - use_org_knowledgebase
        - background_noise_preset
        - recording_enabled
        - stt_keyterms
        - stt_model
        - tts_speed_pct
        - failover_transfer_destination_id
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````