Skip to main content

Create an associated phone number

POST 
/porting_orders/:porting_order_id/associated_phone_numbers

Creates a new associated phone number for a porting order. This is used for partial porting in GB to specify which phone numbers should be kept or disconnected.

Request

Path Parameters

    porting_order_id uuidrequired

    Identifies the Porting Order associated with the phone number

Body

required

    phone_number_range

    object

    required

    start_at string

    Possible values: Value must match regular expression ^\+\d{7,15}$

    Specifies the start of the phone number range for this associated phone number.

    end_at string

    Possible values: Value must match regular expression ^\+\d{7,15}$

    Specifies the end of the phone number range for this associated phone number.

    action stringrequired

    Possible values: [keep, disconnect]

    Specifies the action to take with this phone number during partial porting.

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/associated_phone_numbers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_number_range": {
"start_at": "+441234567890",
"end_at": "+441234567899"
},
"action": "keep"
}'

Response samples


{
"data": {
"id": "f24151b6-3389-41d3-8747-7dd8c681e5e2",
"porting_order_id": "a24151b6-3389-41d3-8747-7dd8c681e5e2",
"country_code": "GB",
"phone_number_type": "local",
"phone_number_range": {
"start_at": "+441234567890",
"end_at": "+441234567899"
},
"action": "keep",
"record_type": "porting_associated_phone_number",
"created_at": "2021-03-19T10:07:15.527Z",
"updated_at": "2021-03-19T10:07:15.527Z"
}
}