import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const associatedPhoneNumber = await client.portingOrders.associatedPhoneNumbers.delete(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ porting_order_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
);
console.log(associatedPhoneNumber.data);{
"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"
}
}Deletes an associated phone number from a porting order.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const associatedPhoneNumber = await client.portingOrders.associatedPhoneNumbers.delete(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ porting_order_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
);
console.log(associatedPhoneNumber.data);{
"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"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the Porting Order associated with the phone number
Identifies the associated phone number to be deleted
Successful response
Show child attributes
Was this page helpful?