import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const portingPhoneNumberListResponse of client.portingPhoneNumbers.list()) {
console.log(portingPhoneNumberListResponse.porting_order_id);
}{
"data": [
{
"porting_order_status": "in-process",
"phone_number_type": "local",
"phone_number": "13035550987",
"porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
"support_key": "sr_a12345",
"activation_status": "Active",
"portability_status": "confirmed",
"requirements_status": "approved",
"record_type": "porting_phone_number"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Returns a list of your porting phone numbers.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const portingPhoneNumberListResponse of client.portingPhoneNumbers.list()) {
console.log(portingPhoneNumberListResponse.porting_order_id);
}{
"data": [
{
"porting_order_status": "in-process",
"phone_number_type": "local",
"phone_number": "13035550987",
"porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
"support_key": "sr_a12345",
"activation_status": "Active",
"portability_status": "confirmed",
"requirements_status": "approved",
"record_type": "porting_phone_number"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[porting_order_status]
Show child attributes
Filter results by porting order status
draft, in-process, submitted, exception, foc-date-confirmed, cancel-pending, ported, cancelled "in-process"
Successful response
Show child attributes
The current status of the porting order
draft, in-process, submitted, exception, foc-date-confirmed, cancel-pending, ported, cancelled "in-process"
The type of the phone number
landline, local, mobile, national, shared_cost, toll_free "local"
E164 formatted phone number
"13035550987"
Identifies the associated port request
"f1486bae-f067-460c-ad43-73a92848f902"
A key to reference this porting order when contacting Telnyx customer support
"sr_a12345"
Activation status
New, Pending, Conflict, Cancel Pending, Failed, Concurred, Activate RDY, Disconnect Pending, Concurrence Sent, Old, Sending, Active, Cancelled "Active"
Specifies whether Telnyx is able to confirm portability this number in the United States & Canada. International phone numbers are provisional by default.
pending, confirmed, provisional "confirmed"
The current status of the requirements in a INTL porting order
requirement-info-pending, requirement-info-under-review, requirement-info-exception, approved "approved"
Identifies the type of the resource.
"porting_phone_number"
Was this page helpful?