Create a phone number extension
POSThttps://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions
Creates a new phone number extension.
Request
Path Parameters
porting_order_id uuidrequired
Identifies the Porting Order associated with the phone number extension
- application/json
Body
required
porting_phone_number_id uuidrequired
Identifies the porting phone number associated with this porting phone number extension.
extension_range
object
required
activation_ranges
object[]
required
Specifies the activation ranges for this porting phone number extension. The activation range must be within the extension range and should not overlap with other activation ranges.
Responses
201: Successful response
- application/json
404: Not found
422: Unprocessable entity. Check message field in response for details.
Request samples
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
curl -L 'https://api.telnyx.com/v2/porting_orders/:porting_order_id/phone_number_extensions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
]
}'
Response samples
{
"data": {
"id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"porting_phone_number_id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"extension_range": {
"start_at": 1,
"end_at": 10
},
"activation_ranges": [
{
"start_at": 1,
"end_at": 10
}
],
"record_type": "porting_phone_number_extension",
"created_at": "2021-03-19T10:07:15.527Z",
"updated_at": "2021-03-19T10:07:15.527Z"
}
}