Skip to main content
GET
/
phone_numbers
/
jobs
/
{id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const job = await client.phoneNumbers.jobs.retrieve('id');

console.log(job.data);
{
  "data": {
    "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
    "record_type": "phone_numbers_job",
    "status": "pending",
    "type": "update_emergency_settings",
    "etc": "2020-10-30T18:10:00.000Z",
    "created_at": "2020-10-23T18:10:00.000Z",
    "updated_at": "2020-10-23T18:10:01.000Z",
    "phone_numbers": [
      {
        "id": "2637816387126861836"
      },
      {
        "phone_number": "+19715555098"
      },
      {
        "phone_number": "+19705555099"
      },
      {
        "id": "3388768018273"
      }
    ],
    "successful_operations": [
      {
        "id": "2637816387126861836",
        "phone_number": "+19705555098"
      },
      {
        "id": "33081887126861836",
        "phone_number": "+19715555098"
      }
    ],
    "pending_operations": [
      {
        "id": "2637816387126861837",
        "phone_number": "+19705555099"
      }
    ],
    "failed_operations": [
      {
        "id": "3388768018273",
        "phone_number": "+19705551234",
        "errors": [
          {
            "code": "10015",
            "title": "Bad Request",
            "detail": "The field is invalid.",
            "source": {
              "pointer": "/emergency_address_id"
            }
          }
        ]
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identifies the Phone Numbers Job.

Response

Phone numbers job details.

data
object
Example:
{
  "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7",
  "record_type": "phone_numbers_job",
  "status": "pending",
  "type": "update_emergency_settings",
  "etc": "2020-10-30T18:10:00.000Z",
  "created_at": "2020-10-23T18:10:00.000Z",
  "updated_at": "2020-10-23T18:10:01.000Z",
  "phone_numbers": [
    { "id": "2637816387126861836" },
    { "phone_number": "+19715555098" },
    { "phone_number": "+19705555099" },
    { "id": "3388768018273" }
  ],
  "successful_operations": [
    {
      "id": "2637816387126861836",
      "phone_number": "+19705555098"
    },
    {
      "id": "33081887126861836",
      "phone_number": "+19715555098"
    }
  ],
  "pending_operations": [
    {
      "id": "2637816387126861837",
      "phone_number": "+19705555099"
    }
  ],
  "failed_operations": [
    {
      "id": "3388768018273",
      "phone_number": "+19705551234",
      "errors": [
        {
          "code": "10015",
          "title": "Bad Request",
          "detail": "The field is invalid.",
          "source": { "pointer": "/emergency_address_id" }
        }
      ]
    }
  ]
}