Verify ownership of phone numbers
POST/phone_numbers/actions/verify_ownership
Verifies ownership of the provided phone numbers and returns a mapping of numbers to their IDs, plus a list of numbers not found in the account.
Request
- application/json
Body
required
phone_numbers string[]required
Possible values: >= 1
, <= 1000
Array of phone numbers to verify ownership for
Responses
200: Phone number ownership verification completed.
- application/json
422: Unprocessable Entity
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/phone_numbers/actions/verify_ownership' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_numbers": [
"+15551234567"
]
}'
Response samples
{
"data": {
"found": [
{
"number_val_e164": "+15551234567",
"id": "1293384261075731499"
}
],
"not_found": [
"+15551234568"
],
"record_type": "number_ownership_verification"
}
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}