Skip to main content

Update a phone number

PATCH 
/phone_numbers/:id

Update a phone number

Request

Path Parameters

    id int64required

    Identifies the resource.

Body

required

Updated settings for the phone number.

    tags string[]

    A list of user-assigned tags to help organize phone numbers.

    external_pin string

    If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism.

    hd_voice_enabled boolean

    Indicates whether HD voice is enabled for this number.

    customer_reference string

    A customer reference string for customer look ups.

    connection_id string

    Identifies the connection associated with the phone number.

    billing_group_id string

    Identifies the billing group associated with the phone number.

    number_level_routing string

    Possible values: [disabled]

    Default value: enabled

    Deprecated field, the only value for this is 'disabled'. All routing for numbers should be configured via connection settings.

Responses

200: Successful response with details about a phone number.

default: Unexpected error

Request samples


curl -L -X PATCH 'https://api.telnyx.com/v2/phone_numbers/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
"tags": [
"tag"
],
"address_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
"external_pin": "1234",
"customer_reference": "customer-reference",
"connection_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
"billing_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
"number_level_routing": "disabled",
"hd_voice_enabled": true
}'

Response samples


{
"data": {
"id": "1293384261075731499",
"record_type": "phone_number",
"phone_number": "+19705555098",
"status": "active",
"tags": [
"tag_1",
"tag_2"
],
"external_pin": "1234",
"connection_id": "1293384261075731499",
"connection_name": "connection-name",
"customer_reference": "customer-reference",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000",
"messaging_profile_name": "regional-customers",
"billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
"emergency_enabled": true,
"emergency_address_id": "1315261609962112019",
"call_forwarding_enabled": true,
"cnam_listing_enabled": true,
"caller_id_name_enabled": true,
"call_recording_enabled": true,
"t38_fax_gateway_enabled": true,
"number_level_routing": "disabled",
"phone_number_type": "local",
"inbound_call_screening": "disabled",
"purchased_at": "2019-10-23T18:10:00.000Z",
"created_at": "2019-10-23T18:10:00.000Z",
"updated_at": "2019-10-24T18:10:00.000Z",
"hd_voice_enabled": true
}
}