Skip to main content
POST
/
number_block_orders
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const numberBlockOrder = await client.numberBlockOrders.create({
  range: 10,
  starting_number: '+19705555000',
});

console.log(numberBlockOrder.data);
{
  "data": {
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "starting_number": "+19705555000",
    "range": 10,
    "record_type": "number_block_order",
    "connection_id": "346789098765567",
    "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
    "phone_numbers_count": 10,
    "status": "pending",
    "customer_reference": "MY REF 001",
    "created_at": "2018-01-01T00:00:00.000000Z",
    "updated_at": "2018-01-01T00:00:00.000000Z",
    "requirements_met": true
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
starting_number
string
required

Starting phone number block

Example:

"+19705555000"

range
integer
required

The phone number range included in the block.

Example:

10

connection_id
string

Identifies the connection associated with this phone number.

Example:

"346789098765567"

messaging_profile_id
string

Identifies the messaging profile associated with the phone number.

Example:

"abc85f64-5717-4562-b3fc-2c9600"

customer_reference
string

A customer reference string for customer look ups.

Example:

"MY REF 001"

Response

Successful response with details about a number block order.

data
object
Example:
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"starting_number": "+19705555000",
"range": 10,
"record_type": "number_block_order",
"connection_id": "346789098765567",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
"phone_numbers_count": 10,
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true
}