Skip to main content

Create a number order

POST 
/origination/number_orders

Creates a number order. Numbers in the order should have appeared in a number search within the last 24 hours.

You may send requested_numbers_with_metadata, requested_inexplicit_numbers, and/or requested_numbers.

Send requested_numbers_with_metadata when ordering specific numbers seen in recent search results. The metadata that you send is meant to satisfy local requirements associated with numbers purchased. If no local requirements exist, as is the case for US numbers, you can simply omit everything but the numbers themselves.

{
"requested_numbers_with_metadata": [
{ "number": "+13035551111", "address_id": "1" },
{ "number": "+13035551112", "address_id": "1" },
{ "number": "+13035551113", "address_id": "2" }
]
}

Send requested_inexplicit_numbers when ordering numbers from inexplicit search results. You'll pass along the inexplicit search results of the numbers you wish to purchase, plus a quantity and, optionally, an address_id. The address_id is used to satisfy number ownership verification requirements in some localities. When provided, it must reference an address record on your account. That address will be passed along to the local numbering authorities when required.

{
"requested_inexplicit_numbers": [
"quantity": 100,
"address_id": "123",
"national_destination_code": "9",
"country_iso": "FI",
"region_name": "Helsinki",
"region_type": "city"
]
}

We have kept requested_numbers available for backward compatibility and greater ease when ordering numbers without additional requirements:

{
"requested_numbers": ["+13035551111", "+13035551112", "+13035551113"]
}

Request

Body

required

Number order to add

    requested_numbers_with_metadata object[]
    requested_inexplicit_numbers object[]
    requested_numbers string[]
    connection_id string

    ID of connection to be associated with phone numbers in the order.

    messaging_profile_id string

    ID of messaging profile to be associated with phone numbers in the order.

Responses

200: NumberOrder response

400: Bad request

401: Unauthorized

Request samples


curl -L 'https://api.telnyx.com/origination/number_orders' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"requested_numbers_with_metadata": [
{}
],
"requested_inexplicit_numbers": [
{}
],
"requested_numbers": [
"string"
],
"connection_id": "string",
"messaging_profile_id": "string"
}'

Response samples


{
"id": "string"
}