Check out our upcoming events and meetups! View events →
Creates a new phone number extension.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const phoneNumberExtension = await client.portingOrders.phoneNumberExtensions.create(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
activation_ranges: [{ end_at: 10, start_at: 1 }],
extension_range: { end_at: 10, start_at: 1 },
porting_phone_number_id: 'f24151b6-3389-41d3-8747-7dd8c681e5e2',
},
);
console.log(phoneNumberExtension.data);{
"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"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the Porting Order associated with the phone number extension
Identifies the porting phone number associated with this porting phone number extension.
"f24151b6-3389-41d3-8747-7dd8c681e5e2"
Show child attributes
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.
Show child attributes
Successful response
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const phoneNumberExtension = await client.portingOrders.phoneNumberExtensions.create(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
activation_ranges: [{ end_at: 10, start_at: 1 }],
extension_range: { end_at: 10, start_at: 1 },
porting_phone_number_id: 'f24151b6-3389-41d3-8747-7dd8c681e5e2',
},
);
console.log(phoneNumberExtension.data);{
"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"
}
}