Skip to main content

Assign a phone number to a channel zone

POST 
/channel_zones/:channel_zone_id/channel_zone_phone_numbers

You should own the phone number being assigned to the channel zone. Remember that you should reserve channels in this channel zone, otherwise you won't be able to receive incoming calls.

Request

Path Parameters

    channel_zone_id stringrequired

    Channel zone identifier

Body

required

Phone number to assign to the channel zone. The phone number should be in E.164 format.

    phone_number +E.164required

Responses

200: A new inserted phone number

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/phone_numbers/channel_zones/:channel_zone_id/channel_zone_phone_numbers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_number": "+15554441234"
}'

Response samples


{
"record_type": "channel_zone_phone_number",
"channel_zone_id": "1653e6a1-4bfd-4857-97c6-6a51e1c34477",
"id": "3da3c749-bb7d-4ad6-acae-ca0d415ae08b",
"phone_number": "+15554441234",
"created_at": "2019-01-23T18:10:02.574Z"
}