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 job of client.phoneNumberBlocks.jobs.list()) {
console.log(job.id);
}{
"data": [
{
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "phone_numbers_job",
"status": "pending",
"type": "delete_phone_number_block",
"etc": "2020-10-30T18:10:00.000Z",
"created_at": "2020-10-23T18:10:00.000Z",
"updated_at": "2020-10-23T18:10:01.000Z",
"successful_operations": [],
"failed_operations": []
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}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 job of client.phoneNumberBlocks.jobs.list()) {
console.log(job.id);
}{
"data": [
{
"id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
"record_type": "phone_numbers_job",
"status": "pending",
"type": "delete_phone_number_block",
"etc": "2020-10-30T18:10:00.000Z",
"created_at": "2020-10-23T18:10:00.000Z",
"updated_at": "2020-10-23T18:10:01.000Z",
"successful_operations": [],
"failed_operations": []
}
],
"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.
Specifies the sort order for results. If not given, results are sorted by created_at in descending order.
created_at "created_at"
Consolidated filter parameter (deepObject style). Originally: filter[type], filter[status]
Show child attributes
Successful response with a list of phone number blocks background jobs.
Show child attributes
Identifies the resource.
"42587e44-3a3e-46de-9255-0c9a7a1d1ec7"
Identifies the type of the resource.
"phone_number_block_job"
Indicates the completion status of the background operation.
pending, in_progress, completed, failed "pending"
Identifies the type of the background job.
delete_phone_number_block "delete_phone_number_block"
ISO 8601 formatted date indicating when the estimated time of completion of the background job.
ISO 8601 formatted date indicating when the resource was created.
ISO 8601 formatted date indicating when the resource was updated.
Show child attributes
The phone number in e164 format.
The phone number's ID
Show child attributes
"10007"
"Unexpected error"
"An unexpected error occured."
Was this page helpful?