Skip to main content

Create a messaging hosted number order

POST 
/messaging_hosted_number_orders

Create a messaging hosted number order

Request

Body

Message payload

    phone_numbers +E.164[]

    Phone numbers to be used for hosted messaging.

    messaging_profile_id string

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

Responses

200: Successful response with details about a messaging hosted number order.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/messaging_hosted_number_orders' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
"phone_numbers": [
"+18665550001",
"+18665550002"
]
}'

Response samples


{
"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"
}
]
}
}