Validate the verification codes for the hosted numbers order
POST/messaging_hosted_number_orders/:id/validation_codes
Validate the verification codes sent to the numbers of the hosted order. The verification codes must be created in the verification codes endpoint.
Request
Path Parameters
id stringrequired
Order ID related to the validation codes.
- application/json
Body
Message payload
Array [
]
verification_codes
object[]
required
phone_number +E.164required
code stringrequired
Responses
200: Successful response with the phone numbers and their respective status of the validation codes.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/messaging_hosted_number_orders/:id/validation_codes' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"verification_codes": [
{
"phone_number": "string",
"code": "string"
}
]
}'
Response samples
{
"data": {
"phone_numbers": [
{
"phone_number": "string",
"status": "verified"
}
],
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}