# Create Telephony Configuration

> POST /api/v1/organizations/telephony-configs — request parameters and responses from the Menace Voice API schema.

`POST /api/v1/organizations/telephony-configs`

{/* Generated by scripts/sync_docs_api.mjs. Edit the API schema source to change the contract. */}

See [authentication](/api-reference/authentication) for workspace API access. Public embed and artifact endpoints use their documented session or access tokens.

## API contract for documentation tools

Generated from the OpenAPI schema. Do not infer a different parameter type from an example. Authentication headers are alternatives as explained in the authentication guide.

### Parameters

| Name | Location | Type | Required | Description and constraints |
| --- | --- | --- | --- | --- |
| authorization | header | string or null | no |  |
| X-API-Key | header | string or null | no |  |

### Request body: application/json

Required body. Schema: TelephonyConfigurationCreateRequest (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| name | string | yes | minLength: 1; maxLength: 64 |
| is_default_outbound | boolean | no | default: false |
| config | ARIConfigurationRequest (object) or CloudonixConfigurationRequest (object) or PlivoConfigurationRequest (object) or TelnyxConfigurationRequest (object) or TwilioConfigurationRequest (object) or VobizConfigurationRequest (object) or VonageConfigurationRequest (object) | yes |  |

### Response 200

Successful Response

application/json: TelephonyConfigurationDetail (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| id | integer | yes |  |
| name | string | yes |  |
| provider | string | yes |  |
| connectivity | string | no | enum: ["api","sip"]; default: "api" |
| is_default_outbound | boolean | yes |  |
| inactive | boolean | no | default: false |
| inactive_since | string or null | no |  |
| inactive_reason | string or null | no |  |
| credentials | object | yes |  |
| sip_connectivity | SIPConnectivityDetails (object) or null | no |  |
| setup_checklist | ProviderSetupChecklist (object) or null | no |  |
| supports_trunks | boolean | no | default: false |
| trunks | array of TrunkResponse (object) | no |  |
| created_at | string | yes | format: "date-time" |
| updated_at | string | yes | format: "date-time" |

### Response 404

Not found

### Response 422

Validation Error

application/json: HTTPValidationError (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| detail | array of ValidationError (object) | no |  |

## OpenAPI

````yaml api-reference/openapi.json post /api/v1/organizations/telephony-configs
openapi: 3.1.0
info:
  title: Menace Voice API
  description: API for Menace Voice agents
  version: 1.0.0
servers:
  - url: https://voice.menaceui.com
    description: Production
  - url: http://localhost:8000
    description: Local development
paths:
  /api/v1/organizations/telephony-configs:
    post:
      tags:
        - main
        - organizations
      summary: Create Telephony Configuration
      description: Create a new telephony configuration for the org.
      operationId: create_telephony_configuration_api_v1_organizations_telephony_configs_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TelephonyConfigurationCreateRequest"
      responses:
        "200":
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TelephonyConfigurationDetail"
        "404":
          description: Not found
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    ARIConfigurationRequest:
      properties:
        provider:
          type: string
          const: ari
          title: Provider
          default: ari
        ari_endpoint:
          type: string
          title: Ari Endpoint
          description: ARI base URL (e.g., http://asterisk.example.com:8088)
        app_name:
          type: string
          title: App Name
          description: ARI username, matching the ari.conf section name
        app_password:
          type: string
          title: App Password
          description: ARI user password
        ws_client_name:
          type: string
          title: Ws Client Name
          description: websocket_client.conf connection name for externalMedia (e.g.,
            dograh_staging)
          default: ""
        external_pbx:
          anyOf:
            - $ref: "#/components/schemas/VicidialExternalPBXConfiguration"
            - type: "null"
          description: Optional external PBX connected through this Asterisk instance
      type: object
      required:
        - ari_endpoint
        - app_name
        - app_password
      title: ARIConfigurationRequest
      description: Request schema for Asterisk ARI configuration.
    CloudonixConfigurationRequest:
      properties:
        provider:
          type: string
          const: cloudonix
          title: Provider
          default: cloudonix
        bearer_token:
          type: string
          title: Bearer Token
          description: Cloudonix API Bearer Token
        domain_id:
          type: string
          title: Domain Id
          description: Cloudonix domain name
        webhook_secret:
          anyOf:
            - type: string
              minLength: 32
            - type: "null"
          title: Webhook Secret
          description: Webhook bearer secret, distinct from the Cloudonix API token.
            Saving synchronizes the domain profile authorization-api-key.
        application_name:
          anyOf:
            - type: string
            - type: "null"
          title: Application Name
          description: Cloudonix Voice Application name. The application's url is updated
            when inbound workflows are attached to numbers on this domain. If
            omitted, an application is auto-created on save and its name is
            stored on the configuration.
      type: object
      required:
        - bearer_token
        - domain_id
      title: CloudonixConfigurationRequest
      description: Request schema for Cloudonix configuration.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlivoConfigurationRequest:
      properties:
        provider:
          type: string
          const: plivo
          title: Provider
          default: plivo
        auth_id:
          type: string
          title: Auth Id
          description: Plivo Auth ID
        auth_token:
          type: string
          title: Auth Token
          description: Plivo Auth Token
        application_id:
          anyOf:
            - type: string
            - type: "null"
          title: Application Id
          description: Plivo Application ID. The application's answer_url is updated when
            inbound workflows are attached to numbers on this account. If
            omitted, an application is auto-created on save and its id is stored
            on the configuration.
      type: object
      required:
        - auth_id
        - auth_token
      title: PlivoConfigurationRequest
      description: Request schema for Plivo configuration.
    ProviderSetupChecklist:
      properties:
        ready_for_outbound:
          type: boolean
          title: Ready For Outbound
        outbound_blocked_reason:
          anyOf:
            - type: string
            - type: "null"
          title: Outbound Blocked Reason
        steps:
          items:
            $ref: "#/components/schemas/SetupStep"
          type: array
          title: Steps
        docs_url:
          anyOf:
            - type: string
            - type: "null"
          title: Docs Url
      type: object
      required:
        - ready_for_outbound
        - outbound_blocked_reason
        - steps
      title: ProviderSetupChecklist
      description: >-
        A configuration's setup progress, as computed by its provider.


        ``ready_for_outbound`` is derived rather than reported independently so
        a

        provider cannot claim readiness while leaving a blocking step
        incomplete.
    SIPConnectivityDetails:
      properties:
        provider_display_name:
          type: string
          title: Provider Display Name
        regions:
          items:
            $ref: "#/components/schemas/SIPRegionDetails"
          type: array
          title: Regions
      type: object
      required:
        - provider_display_name
        - regions
      title: SIPConnectivityDetails
      description: Provider-supplied SIP connection details displayed to customers.
    SIPRegionDetails:
      properties:
        region:
          type: string
          title: Region
        inbound_transports:
          items:
            $ref: "#/components/schemas/SIPTransportDetails"
          type: array
          title: Inbound Transports
        outbound_origin_ip:
          type: string
          title: Outbound Origin Ip
      type: object
      required:
        - region
        - inbound_transports
        - outbound_origin_ip
      title: SIPRegionDetails
      description: Inbound and outbound SIP details for one provider region.
    SIPTransportDetails:
      properties:
        transport:
          type: string
          title: Transport
        hostname:
          type: string
          title: Hostname
        port:
          type: integer
          title: Port
        uri:
          type: string
          title: Uri
      type: object
      required:
        - transport
        - hostname
        - port
        - uri
      title: SIPTransportDetails
      description: Connection details for one supported inbound SIP transport.
    SetupStep:
      properties:
        key:
          type: string
          title: Key
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        complete:
          type: boolean
          title: Complete
        blocks_outbound:
          type: boolean
          title: Blocks Outbound
          default: false
      type: object
      required:
        - key
        - title
        - description
        - complete
      title: SetupStep
      description: |-
        One thing the customer must do before a configuration can carry calls.

        ``blocks_outbound`` separates "not done yet" from "outbound calls will
        fail". Inbound-only steps are reported so the checklist is complete
        without making them gate the Phone Call button.
    TelephonyConfigurationCreateRequest:
      properties:
        name:
          type: string
          maxLength: 64
          minLength: 1
          title: Name
        is_default_outbound:
          type: boolean
          title: Is Default Outbound
          default: false
        config:
          oneOf:
            - $ref: "#/components/schemas/ARIConfigurationRequest"
            - $ref: "#/components/schemas/CloudonixConfigurationRequest"
            - $ref: "#/components/schemas/PlivoConfigurationRequest"
            - $ref: "#/components/schemas/TelnyxConfigurationRequest"
            - $ref: "#/components/schemas/TwilioConfigurationRequest"
            - $ref: "#/components/schemas/VobizConfigurationRequest"
            - $ref: "#/components/schemas/VonageConfigurationRequest"
          title: Config
          discriminator:
            propertyName: provider
            mapping:
              ari: "#/components/schemas/ARIConfigurationRequest"
              cloudonix: "#/components/schemas/CloudonixConfigurationRequest"
              plivo: "#/components/schemas/PlivoConfigurationRequest"
              telnyx: "#/components/schemas/TelnyxConfigurationRequest"
              twilio: "#/components/schemas/TwilioConfigurationRequest"
              vobiz: "#/components/schemas/VobizConfigurationRequest"
              vonage: "#/components/schemas/VonageConfigurationRequest"
      type: object
      required:
        - name
        - config
      title: TelephonyConfigurationCreateRequest
      description: |-
        Body for ``POST /telephony-configs``.

        ``config`` carries the provider-specific credential fields (the same
        discriminated union used by the legacy single-config endpoint). Any
        ``from_numbers`` on the inner config are ignored — phone numbers are
        managed via the dedicated phone-numbers endpoints.
    TelephonyConfigurationDetail:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        provider:
          type: string
          title: Provider
        connectivity:
          type: string
          enum:
            - api
            - sip
          title: Connectivity
          default: api
        is_default_outbound:
          type: boolean
          title: Is Default Outbound
        inactive:
          type: boolean
          title: Inactive
          default: false
        inactive_since:
          anyOf:
            - type: string
              format: date-time
            - type: "null"
          title: Inactive Since
        inactive_reason:
          anyOf:
            - type: string
            - type: "null"
          title: Inactive Reason
        credentials:
          additionalProperties: true
          type: object
          title: Credentials
        sip_connectivity:
          anyOf:
            - $ref: "#/components/schemas/SIPConnectivityDetails"
            - type: "null"
        setup_checklist:
          anyOf:
            - $ref: "#/components/schemas/ProviderSetupChecklist"
            - type: "null"
        supports_trunks:
          type: boolean
          title: Supports Trunks
          default: false
        trunks:
          items:
            $ref: "#/components/schemas/TrunkResponse"
          type: array
          title: Trunks
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - provider
        - is_default_outbound
        - credentials
        - created_at
        - updated_at
      title: TelephonyConfigurationDetail
      description: Body of ``GET /telephony-configs/{id}`` — credentials are masked.
    TelnyxConfigurationRequest:
      properties:
        provider:
          type: string
          const: telnyx
          title: Provider
          default: telnyx
        api_key:
          type: string
          title: Api Key
          description: Telnyx API Key
        connection_id:
          anyOf:
            - type: string
            - type: "null"
          title: Connection Id
          description: Telnyx Call Control Application ID (connection_id). If omitted, a
            Call Control Application is auto-created on save and its id is
            stored on the configuration.
        webhook_public_key:
          anyOf:
            - type: string
            - type: "null"
          title: Webhook Public Key
          description: Webhook public key from Mission Control Portal → Keys & Credentials
            → Public Key. Used to verify Telnyx webhook signatures.
      type: object
      required:
        - api_key
      title: TelnyxConfigurationRequest
      description: Request schema for Telnyx configuration.
    TrunkResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
        settings:
          additionalProperties: true
          type: object
          title: Settings
        phone_number_count:
          type: integer
          title: Phone Number Count
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - enabled
        - settings
        - created_at
        - updated_at
      title: TrunkResponse
      description: >-
        One carrier path on a configuration.


        ``settings`` is the provider's own trunk schema (validated on write
        against

        ``ProviderSpec.trunk_settings_cls``). The provider-side identifier is

        Dograh's bookkeeping and is not exposed.
    TwilioConfigurationRequest:
      properties:
        provider:
          type: string
          const: twilio
          title: Provider
          default: twilio
        account_sid:
          type: string
          title: Account Sid
          description: Twilio Account SID
        auth_token:
          type: string
          title: Auth Token
          description: Twilio Auth Token
        amd_enabled:
          type: boolean
          title: Amd Enabled
          description: Detect whether outbound calls are answered by a person or machine.
            Twilio may bill AMD as an additional per-call feature.
          default: false
      type: object
      required:
        - account_sid
        - auth_token
      title: TwilioConfigurationRequest
      description: Request schema for Twilio configuration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VicidialAgentAPIConfiguration:
      properties:
        url:
          type: string
          minLength: 1
          title: Url
          description: Full URL to agc/api.php
        username:
          type: string
          minLength: 1
          title: Username
          description: VICIdial agent API user
        password:
          type: string
          minLength: 1
          title: Password
          description: VICIdial agent API password
        source:
          type: string
          title: Source
          description: VICIdial API source tag
          default: dograh
      type: object
      required:
        - url
        - username
        - password
      title: VicidialAgentAPIConfiguration
      description: VICIdial remote-agent call-control API configuration.
    VicidialExternalPBXConfiguration:
      properties:
        type:
          type: string
          const: vicidial
          title: Type
          default: vicidial
        agent_api:
          $ref: "#/components/schemas/VicidialAgentAPIConfiguration"
        non_agent_api:
          anyOf:
            - $ref: "#/components/schemas/VicidialNonAgentAPIConfiguration"
            - type: "null"
        timeout_seconds:
          type: integer
          maximum: 30
          minimum: 1
          title: Timeout Seconds
          default: 8
      type: object
      required:
        - agent_api
      title: VicidialExternalPBXConfiguration
      description: External-PBX configuration used by the VICIdial strategy adapter.
    VicidialNonAgentAPIConfiguration:
      properties:
        url:
          anyOf:
            - type: string
            - type: "null"
          title: Url
          description: Full non_agent_api.php URL
        username:
          anyOf:
            - type: string
            - type: "null"
          title: Username
          description: Non-agent API user
        password:
          anyOf:
            - type: string
            - type: "null"
          title: Password
          description: Non-agent API password
        source:
          type: string
          title: Source
          description: Non-agent API source tag
          default: dograh
      type: object
      title: VicidialNonAgentAPIConfiguration
      description: Optional VICIdial non-agent API configuration for lead updates.
    VobizConfigurationRequest:
      properties:
        provider:
          type: string
          const: vobiz
          title: Provider
          default: vobiz
        auth_id:
          type: string
          title: Auth Id
          description: Vobiz Account ID (e.g., MA_SYQRLN1K)
        auth_token:
          type: string
          title: Auth Token
          description: Vobiz Auth Token
        application_id:
          anyOf:
            - type: string
            - type: "null"
          title: Application Id
          description: Vobiz Application ID. The application's answer_url is updated when
            inbound workflows are attached to numbers on this account. If
            omitted, an application is auto-created on save and its id is stored
            on the configuration.
      type: object
      required:
        - auth_id
        - auth_token
      title: VobizConfigurationRequest
      description: Request schema for Vobiz configuration.
    VonageConfigurationRequest:
      properties:
        provider:
          type: string
          const: vonage
          title: Provider
          default: vonage
        api_key:
          type: string
          title: Api Key
          description: Vonage API Key
        api_secret:
          type: string
          title: Api Secret
          description: Vonage API Secret
        application_id:
          type: string
          title: Application Id
          description: Vonage Application ID
        private_key:
          type: string
          title: Private Key
          description: Private key for JWT generation
        signature_secret:
          anyOf:
            - type: string
            - type: "null"
          title: Signature Secret
          description: Vonage signature secret used to verify signed webhooks
      type: object
      required:
        - api_key
        - api_secret
        - application_id
        - private_key
      title: VonageConfigurationRequest
      description: Request schema for Vonage configuration.
````
