Skip to main content

Create a phone number extension

POST 
/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

Body

required

    porting_phone_number_id uuidrequired

    Identifies the porting phone number associated with this porting phone number extension.

    extension_range

    object

    required

    start_at integerrequired

    Specifies the start of the extension range for this porting phone number extension.

    end_at integerrequired

    Specifies the end of the extension range for this porting phone number extension.

    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.

  • Array [

  • start_at integerrequired

    Specifies the start of the activation range. Must be greater or equal the start of the extension range.

    end_at integerrequired

    Specifies the end of the activation range. It must be no more than the end of the extension range.

  • ]

  • 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

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
}
]
}'

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"
}
}