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

Open SidemenuAPI Reference
API Reference
Close Sidemenu

Messaging Hosted Number

List All Messaging Hosted Number OrderslistMessagingHostedNumberOrder

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

List All Messaging Hosted 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/messaging_hosted_number_orders"
Responses
200

Expected messaging hosted numbers order to a valid request

default

Unexpected error

Success Response
{
  "data": [
    {
      "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
      "phone_numbers": [
        {
          "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
          "phone_number": "+18665550001",
          "record_type": "messaging_hosted_number",
          "status": "pending"
        },
        {
          "id": "464bd54e-a328-4b11-a131-28e6793cb6f2",
          "phone_number": "+18665550002",
          "record_type": "messaging_hosted_number",
          "status": "pending"
        }
      ],
      "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
      "record_type": "messaging_hosted_number_order",
      "status": "pending"
    }
  ]
}

New Messaging Hosted Numbers OrdernewMessagingHostedNumberOrder

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

New Messaging Hosted Numbers Order

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"messaging_profile_id":"dc8f39ac-953d-4520-b93b-786ae87db0da","phone_numbers":["+18665550001","+18665550002"]}' \
  https://api.telnyx.com/v2/messaging_hosted_number_orders
Parameters
In body
messaging_profile_id
string (uuid)
optional

Automatically associate the number with this messaging profile ID when the order is complete.

phone_numbers
array of string
optional

Phone numbers to be used for hosted messaging.

Responses
200

Expected messaging hosted numbers order to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
    "phone_numbers": [
      {
        "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
        "phone_number": "+18665550001",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      },
      {
        "id": "464bd54e-a328-4b11-a131-28e6793cb6f2",
        "phone_number": "+18665550002",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      }
    ],
    "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
    "record_type": "messaging_hosted_number_order",
    "status": "pending"
  }
}

Get Messaging Hosted Numbers Order InformationgetMessagingHostedNumberOrder

get https://api.telnyx.com/v2/messaging_hosted_number_orders/{id}

Get Messaging Hosted Numbers Order Information

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

Identifies the type of resource.

Responses
200

Expected messaging hosted numbers order to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
    "phone_numbers": [
      {
        "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
        "phone_number": "+18665550001",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      },
      {
        "id": "464bd54e-a328-4b11-a131-28e6793cb6f2",
        "phone_number": "+18665550002",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      }
    ],
    "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
    "record_type": "messaging_hosted_number_order",
    "status": "pending"
  }
}

Upload LOA and Bill required for a Messaging Hosted Number OrderuploadFilesMessagingHostedNumberOrder

post https://api.telnyx.com/v2/messaging_hosted_number_orders/{id}/actions/file_upload

Upload LOA and Bill required for a Messaging Hosted Number Order

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{}' \
  https://api.telnyx.com/v2/messaging_hosted_number_orders/{id}/actions/file_upload
Parameters
In path
id
string
required

Identifies the type of resource.

In body
bill
string (binary)
optional

Must be the last month's bill with proof of ownership of all of the numbers in the order in PDF format.

loa
string (binary)
optional

Must be a signed LOA for the numbers in the order in PDF format.

Responses
200

Expected messaging hosted numbers order to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
    "phone_numbers": [
      {
        "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
        "phone_number": "+18665550001",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      },
      {
        "id": "464bd54e-a328-4b11-a131-28e6793cb6f2",
        "phone_number": "+18665550002",
        "record_type": "messaging_hosted_number",
        "status": "pending"
      }
    ],
    "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
    "record_type": "messaging_hosted_number_order",
    "status": "pending"
  }
}

Delete Messaging Hosted NumberdeleteMessagingHostedNumber

delete https://api.telnyx.com/v2/messaging_hosted_numbers/{id}

Delete Messaging Hosted Number

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

Identifies the type of resource.

Responses
200

Expected messaging hosted number to a valid request

default

Unexpected error

Success Response
{
  "data": [
    {
      "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
      "phone_number": "+18665550001",
      "record_type": "messaging_hosted_number",
      "status": "successful"
    }
  ]
}

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