Skip to main content

Update a number

PUT 
/origination/numbers/:id

Updates the specified number with the values of the parameters passed. Any parameters not included in the request will be left unchanged. The ID in the path can either be the telephone number (e.g. +12124567890) or object ID.

Request

Path Parameters

    id stringrequired

    Telephone number (ex: +12124567890) or object ID of number to update

Body

required

Updated number object

    connection_id string
    enable_tech_prefix boolean
    translated_number string
    forwards_to string

    the number that this number should be forwarded to; when this is set, forwarding_type must also be set

    forwarding_type string

    sets when this number should have its calls forwarded; valid values are 'always' and 'on-failure'

    enable_caller_id_name boolean

    if true, enables sending of CNAM information for incoming calls to the number

    usage_payment_method string

    Possible values: [pay-per-minute, channel]

    Default value: pay-per_minute

    setting for whether a number is billed per minute or uses your concurrent channels

    enable_rtp_auto_adjust boolean

    Default value: true

    When RTP Auto-Adjust is enabled, the destination RTP address port will be automatically changed to match the source of the incoming RTP packets.

    cnam_listing_enabled boolean

    Enable CNAM listings for this number. Requires cnam_listing_details to also be filled in.

    cnam_listing_details string

    The CNAM listing details for this number. Must be alphanumeric characters or spaces with a maximum length of 15. Requires cnam_listing_enabled to also be set.

    external_pin string

    External PINs are used to ensure that phone numbers on your account cannot be ported to another carrier without your consent. This has an account level default, that may be overriden per phone number. External PINs must be 4 numeric digits ('3456').

    t38_fax_gateway_enabled boolean
    accept_any_rtp_packets_enabled boolean
    tag_list string[]
    inbound_call_recording_enabled boolean

    When enabled, any inbound call to this number will be recorded.

    inbound_call_recording_format string

    Possible values: [wav, mp3]

    Default value: wav

    The audio file format for calls being recorded.

    inbound_call_recording_channels string

    Possible values: [single, dual]

    Default value: single

    When using 'dual' channels, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.

    billing_group_id string

    The ID of the Billing Group to which the number is assigned. Defaults to null (for no group assigned).

Responses

200: Number updated

400: Bad request

401: Unauthorized

404: Resource not found

Request samples


curl -L -X PUT 'https://api.telnyx.com/origination/numbers/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"connection_id": "string",
"enable_tech_prefix": false,
"translated_number": "string",
"forwards_to": "string",
"forwarding_type": "string",
"enable_caller_id_name": false,
"usage_payment_method": "pay-per_minute",
"enable_rtp_auto_adjust": true,
"cnam_listing_enabled": false,
"cnam_listing_details": "string",
"external_pin": "string",
"t38_fax_gateway_enabled": false,
"accept_any_rtp_packets_enabled": false,
"tag_list": [
"string"
],
"inbound_call_recording_enabled": false,
"inbound_call_recording_format": "wav",
"inbound_call_recording_channels": "single",
"billing_group_id": "string"
}'

Response samples


{
"id": "string",
"connection_id": "string",
"number_val_e164": "string",
"ignore_tech_prefix": true,
"enable_tech_prefix": false,
"translated_number": "string",
"forwards_to": "string",
"forwarding_type": "string",
"tag_list": [
"string"
],
"status": 1,
"purchase_failure_reason": "string",
"e911_enabled": false,
"e911_address_id": "string",
"emergency_status": "disabled",
"address_id": "string",
"usage_payment_method": "pay-per-minute",
"enable_rtp_auto_adjust": true,
"cnam_listing_enabled": false,
"cnam_listing_details": "string",
"external_pin": "string",
"t38_fax_gateway_enabled": false,
"accept_any_rtp_packets_enabled": false,
"number_val": "string",
"inbound_call_recording_enabled": false,
"inbound_call_recording_format": "wav",
"inbound_call_recording_channels": "single",
"billing_group_id": "string"
}