Skip to main content

Create a number order

POST 
/number_orders

Creates a phone number order.

Request

Body

required

    phone_numbers

    object[]

  • Array [

  • phone_number stringrequired

    e164_phone_number

    requirement_group_id string

    ID of requirement group to use to satisfy number requirements

    bundle_id string

    ID of bundle to associate the number to

  • ]

  • connection_id string

    Identifies the connection associated with this phone number.

    messaging_profile_id string

    Identifies the messaging profile associated with the phone number.

    billing_group_id string

    Identifies the billing group 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 order.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/number_orders' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_numbers": [
{
"phone_number": "+19705555098",
"bundle_id": "bc8e4d67-33a0-4cbb-af74-7b58f05bd494"
},
{
"phone_number": "+492111609539",
"requirement_group_id": "dbbd94ee-9079-488f-80ba-f566b247fd79"
}
],
"connection_id": "346789098765567",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
"billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
"customer_reference": "MY REF 001"
}'

Response samples


{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_order",
"phone_numbers_count": 1,
"connection_id": "346789098765567",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
"billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
"phone_numbers": [
{
"id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
"record_type": "number_order_phone_number",
"phone_number": "+19705555098",
"bundle_id": "bc8e4d67-33a0-4cbb-af74-7b58f05bd474",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
"field_type": "address"
}
],
"requirements_met": true,
"status": "success"
}
],
"sub_number_orders_ids": [
"string"
],
"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
}
}