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

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

const response = await client.messagingHostedNumberOrders.validateCodes('id', {
  verification_codes: [{ code: 'code', phone_number: 'phone_number' }],
});

console.log(response.data);
{
  "data": {
    "phone_numbers": [
      {
        "phone_number": "<string>",
        "status": "verified"
      }
    ],
    "order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Order ID related to the validation codes.

Body

application/json

Message payload

verification_codes
object[]
required

Response

Successful response with the phone numbers and their respective status of the validation codes.

data
object