Skip to main content

Create verification codes for the hosted numbers order

POST 
/messaging_hosted_number_orders/:id/verification_codes

Create verification codes to validate numbers of the hosted order. The verification codes will be sent to the numbers of the hosted order.

Request

Path Parameters

    id stringrequired

    Order ID to have a verification code created.

Body

Message payload

    phone_numbers +E.164[]required
    verification_method stringrequired

    Possible values: [sms, call, flashcall]

Responses

201: Verification codes created and sent to the phone numbers of the hosted order.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/messaging_hosted_number_orders/:id/verification_codes' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_numbers": [
"string"
],
"verification_method": "sms"
}'

Response samples


{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}