Skip to main content

Create a number reservation

POST 
/number_reservations

Creates a Phone Number Reservation for multiple numbers.

Request

Body

required

    phone_numbers

    ReservedPhoneNumber[]

  • Array [

  • phone_number e164_phone_number
  • ]

  • customer_reference string

    A customer reference string for customer look ups.

Responses

200: Successful response with details about a number reservation.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/number_reservations' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_reservation",
"phone_numbers": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "reserved_phone_number",
"phone_number": "+19705555098",
"status": "pending",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"expired_at": "2018-01-01T00:00:00.000000Z"
}
],
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z"
}'

Response samples


{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_reservation",
"phone_numbers": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "reserved_phone_number",
"phone_number": "+19705555098",
"status": "pending",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"expired_at": "2018-01-01T00:00:00.000000Z",
"errors": ""
}
],
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z"
}
}