Docs API & Developer Phone Verification (verify/send + verify/check)

Phone Verification (verify/send + verify/check)

Verify one of your own customers' phone numbers with a real SMS code, billed to your own wallet.


Phone Verification (verify/send + verify/check)

Verify one of your own customers' phone numbers with a real, enterable code — for confirming a customer really owns the number they gave you at signup, checkout, or booking. Billed the same per-message rate as any other SMS you send.

POST /api/v1/verify/send

FieldTypeRequiredDescription
tostringYesCustomer's phone in international format e.g. +2348011234567
fromstringNoSender ID (max 11 characters). Defaults to your business name.

Example request

curl -X POST https://app.6xcom.com/api/v1/verify/send \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":"+2348011234567"}'

Response

{
  "success": true,
  "verification_id": 4821
}

POST /api/v1/verify/check

Submit the code your customer typed back. A code expires after 10 minutes and allows up to 5 incorrect attempts before it's locked out (request a new one with verify/send).

FieldTypeRequiredDescription
verification_idintegerYesReturned by verify/send
codestringYesThe code your customer entered

Example request

curl -X POST https://app.6xcom.com/api/v1/verify/check \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"verification_id":4821,"code":"483920"}'

Response

{
  "success": true,
  "verified": true
}

Error codes

StatusMeaning
400SMS send failed (verify/send only)
404Unknown verification_id, or it belongs to a different account
410Code expired — call verify/send again for a new one
429Too many incorrect attempts on this code

Note: there's no email fallback here (unlike 6X's own signup verification) — we only have the phone number you submitted, not a customer email. If SMS delivery isn't possible for that destination, verify/send returns an error you can surface to the customer.

Was this article helpful?