This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

Number Orders

Get multiple Number OrderslistNumberOrders

get https://api.telnyx.com/v2/number_orders

Get a paginated list of Number Orders

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/number_orders?filter[phone_numbers.phone_number][]=%2B18665552368"
Parameters
In query
filter[status]
string
optional

Filter number orders by status

filter[created_at][gt]
string
optional

Filter number orders later than this value

filter[created_at][lt]
string
optional

Filter number orders earlier than this value

filter[phone_numbers.phone_number]
string
optional

Filter number orders having these phone numbers

filter[customer_reference]
string
optional

Filter number orders via the customer reference set

filter[requirements_met]
boolean
optional

Filter number orders by requirements met

Responses
200

Returns a list of number orders

default

Unexpected error

Success Response
{
  "data": [
    {
      "created_at": "2018-01-01T00:00:00.000000Z",
      "customer_reference": "MY REF 001",
      "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
      "phone_numbers_count": 1,
      "record_type": "number_order",
      "requirements_met": true,
      "status": "pending",
      "updated_at": "2018-01-01T00:00:00.000000Z"
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Create Phone Number OrdercreateNumberOrder

post https://api.telnyx.com/v2/number_orders

Creates a Phone Number Order

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{
    "phone_numbers": [{"phone_number": "+18665552368"}]
  }' \
  https://api.telnyx.com/v2/number_orders
Parameters
In body
customer_reference
string
optional

A customer reference string for customer look ups

Example: "MY REF 001"
phone_numbers
array of
optional
phone_number
string (e164_phone_number)
Example: "+19705555098"
regulatory_requirements
array of
field_type
string
Options: [ "string", "datetime", "address_id", "number_order_document_id" ]
field_value
string

The value of the requirement, this could be an id to a resource or a string value

record_type
string
requirement_id
string (uuid)

Unique id for a requirement

Responses
200

Number order has been created successfully

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2018-01-01T00:00:00.000000Z",
    "customer_reference": "MY REF 001",
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "phone_numbers_count": 1,
    "record_type": "number_order",
    "requirements_met": true,
    "status": "pending",
    "updated_at": "2018-01-01T00:00:00.000000Z"
  }
}
Expected Webhooks
number Order Status Update
{
  "data": {
    "created_at": "2018-01-01T00:00:00.000000Z",
    "customer_reference": "MY REF 001",
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "phone_numbers": [
      {
        "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
        "phone_number": "+19705555098",
        "record_type": "number_order_phone_number",
        "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
        "regulatory_requirements": [
          {
            "field_type": "address_id",
            "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
            "record_type": "phone_number_regulatory_requirement",
            "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
          }
        ],
        "requirements_met": true,
        "status": "pending"
      }
    ],
    "phone_numbers_count": 1,
    "record_type": "number_order",
    "requirements_met": true,
    "status": "pending",
    "updated_at": "2018-01-01T00:00:00.000000Z"
  }
}

Get a single phone number orderretrieveNumberOrder

get https://api.telnyx.com/v2/number_orders/{number_order_id}

Get an existing single phone number order

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/number_orders/{number_order_id}"
Parameters
In path
number_order_id
string
required

The number order id

Responses
200

Number order was found

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2018-01-01T00:00:00.000000Z",
    "customer_reference": "MY REF 001",
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "phone_numbers_count": 1,
    "record_type": "number_order",
    "requirements_met": true,
    "status": "pending",
    "updated_at": "2018-01-01T00:00:00.000000Z"
  }
}

Update phone number orderupdateNumberOrder

patch https://api.telnyx.com/v2/number_orders/{number_order_id}

Updates a Phone Number Order

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"customer_reference": "MY REF"}' \
  https://api.telnyx.com/v2/number_orders/{number_order_id}
Parameters
In path
number_order_id
string
required

The number order id

In body
customer_reference
string
optional

A customer reference string for customer look ups

Example: "MY REF 001"
phone_numbers
array of
optional
phone_number
string (e164_phone_number)
Example: "+19705555098"
regulatory_requirements
array of
field_type
string
Options: [ "string", "datetime", "address_id", "number_order_document_id" ]
field_value
string

The value of the requirement, this could be an id to a resource or a string value

record_type
string
requirement_id
string (uuid)

Unique id for a requirement

Responses
200

Number order has been updated succesfully

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2018-01-01T00:00:00.000000Z",
    "customer_reference": "MY REF 001",
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "phone_numbers_count": 1,
    "record_type": "number_order",
    "requirements_met": true,
    "status": "pending",
    "updated_at": "2018-01-01T00:00:00.000000Z"
  }
}

Was this section helpful?was-this-page-helpful