# Create Phone Number

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

`POST /api/v1/organizations/telephony-configs/{config_id}/phone-numbers`

{/* 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 |
| --- | --- | --- | --- | --- |
| config_id | path | integer | yes |  |
| authorization | header | string or null | no |  |
| X-API-Key | header | string or null | no |  |

### Request body: application/json

Required body. Schema: PhoneNumberCreateRequest (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| address | string | yes | minLength: 1; maxLength: 255 |
| country_code | string or null | no |  |
| label | string or null | no |  |
| inbound_workflow_id | integer or null | no |  |
| telephony_trunk_id | integer or null | no |  |
| is_active | boolean | no | default: true |
| is_default_caller_id | boolean | no | default: false |
| extra_metadata | object | no |  |

### Response 200

Successful Response

application/json: PhoneNumberResponse (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| id | integer | yes |  |
| telephony_configuration_id | integer | yes |  |
| address | string | yes |  |
| address_normalized | string | yes |  |
| address_type | string | yes |  |
| country_code | string or null | no |  |
| label | string or null | no |  |
| inbound_workflow_id | integer or null | no |  |
| inbound_workflow_name | string or null | no |  |
| telephony_trunk_id | integer or null | no |  |
| is_active | boolean | yes |  |
| is_default_caller_id | boolean | yes |  |
| extra_metadata | object | yes |  |
| created_at | string | yes | format: "date-time" |
| updated_at | string | yes | format: "date-time" |
| provider_sync | ProviderSyncStatus (object) or null | no |  |

### 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/{config_id}/phone-numbers
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/{config_id}/phone-numbers:
    post:
      tags:
        - main
        - organizations
      summary: Create Phone Number
      operationId: create_phone_number_api_v1_organizations_telephony_configs__config_id__phone_numbers_post
      parameters:
        - name: config_id
          in: path
          required: true
          schema:
            type: integer
            title: Config Id
        - 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/PhoneNumberCreateRequest"
      responses:
        "200":
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PhoneNumberResponse"
        "404":
          description: Not found
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PhoneNumberCreateRequest:
      properties:
        address:
          type: string
          maxLength: 255
          minLength: 1
          title: Address
        country_code:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: "null"
          title: Country Code
        label:
          anyOf:
            - type: string
              maxLength: 64
            - type: "null"
          title: Label
        inbound_workflow_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Inbound Workflow Id
        telephony_trunk_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Telephony Trunk Id
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_default_caller_id:
          type: boolean
          title: Is Default Caller Id
          default: false
        extra_metadata:
          additionalProperties: true
          type: object
          title: Extra Metadata
      type: object
      required:
        - address
      title: PhoneNumberCreateRequest
      description: >-
        Create a new phone number under a telephony configuration.


        ``address_normalized`` and ``address_type`` are computed server-side
        from

        ``address`` (and ``country_code`` if PSTN). ``address`` itself is stored

        verbatim for display.
    PhoneNumberResponse:
      properties:
        id:
          type: integer
          title: Id
        telephony_configuration_id:
          type: integer
          title: Telephony Configuration Id
        address:
          type: string
          title: Address
        address_normalized:
          type: string
          title: Address Normalized
        address_type:
          type: string
          title: Address Type
        country_code:
          anyOf:
            - type: string
            - type: "null"
          title: Country Code
        label:
          anyOf:
            - type: string
            - type: "null"
          title: Label
        inbound_workflow_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Inbound Workflow Id
        inbound_workflow_name:
          anyOf:
            - type: string
            - type: "null"
          title: Inbound Workflow Name
        telephony_trunk_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Telephony Trunk Id
        is_active:
          type: boolean
          title: Is Active
        is_default_caller_id:
          type: boolean
          title: Is Default Caller Id
        extra_metadata:
          additionalProperties: true
          type: object
          title: Extra Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        provider_sync:
          anyOf:
            - $ref: "#/components/schemas/ProviderSyncStatus"
            - type: "null"
      type: object
      required:
        - id
        - telephony_configuration_id
        - address
        - address_normalized
        - address_type
        - is_active
        - is_default_caller_id
        - extra_metadata
        - created_at
        - updated_at
      title: PhoneNumberResponse
    ProviderSyncStatus:
      properties:
        ok:
          type: boolean
          title: Ok
        message:
          anyOf:
            - type: string
            - type: "null"
          title: Message
      type: object
      required:
        - ok
      title: ProviderSyncStatus
      description: |-
        Result of pushing a phone-number change to the upstream provider.

        Returned alongside create/update responses when the route attempted to
        sync inbound webhook configuration. ``ok=False`` is a warning, not a
        fatal error — the DB write succeeded.
    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
````
