Create a number block order
POST/number_block_orders
Creates a phone number block order.
Request
- application/json
Body
required
starting_number e164_phone_numberrequired
Starting phone number block
range integerrequired
The phone number range included in the block.
connection_id string
Identifies the connection associated with this phone number.
messaging_profile_id string
Identifies the messaging profile associated with the phone number.
customer_reference string
A customer reference string for customer look ups.
Responses
200: Successful response with details about a number block order.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/number_block_orders' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"starting_number": "+19705555000",
"range": 10
}'
Response samples
{
"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
}
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}