Skip to main content
POST
/
messaging_hosted_number_orders
/
{id}
/
actions
/
file_upload
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.messagingHostedNumberOrders.actions.uploadFile('id');

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identifies the type of resource.

Body

multipart/form-data

Message payload

loa
file

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

bill
file

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

Response

Successful response with details about a messaging hosted number order.

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