Successful response with a list of messaging hosted number orders.
Array of objects (MessagingHostedNumberOrder) | |
object (PaginationMeta) |
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: messagingHostedNumberOrders } = await telnyx.messagingHostedNumberOrders.list();
{- "data": [
- {
- "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
- "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
- "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"
}
], - "record_type": "messaging_hosted_number_order",
- "status": "pending"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Successful response with details about a messaging hosted number order.
{- "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
- "phone_numbers": [
- "+18665550001",
- "+18665550002"
]
}
{- "data": {
- "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
- "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
- "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"
}
], - "record_type": "messaging_hosted_number_order",
- "status": "pending"
}
}
Successful response with details about a messaging hosted number order.
object (MessagingHostedNumberOrder) | |||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: messagingHostedNumberOrder } = await telnyx.messagingHostedNumberOrder.retrieve('123');
{- "data": {
- "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
- "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
- "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"
}
], - "record_type": "messaging_hosted_number_order",
- "status": "pending"
}
}
Message payload
Successful response with details about a messaging hosted number order.
object (MessagingHostedNumberOrder) | |||||||||||
|
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: messagingHostedNumberOrders.actions.fileUpload } = await telnyx.messagingHostedNumberOrders.actions.fileUpload.create( {} );
{- "data": {
- "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
- "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da",
- "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"
}
], - "record_type": "messaging_hosted_number_order",
- "status": "pending"
}
}
Successful response with details about a messaging hosted number.
const telnyx = require('telnyx')('YOUR_API_KEY'); const { data: messagingHostedNumber } = await telnyx.messagingHostedNumbers.del('123');
{- "data": [
- {
- "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c",
- "phone_number": "+18665550001",
- "record_type": "messaging_hosted_number",
- "status": "successful"
}
]
}