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
| Field | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Customer's phone in international format e.g. +2348011234567 |
| from | string | No | Sender 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).
| Field | Type | Required | Description |
|---|---|---|---|
| verification_id | integer | Yes | Returned by verify/send |
| code | string | Yes | The 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
| Status | Meaning |
|---|---|
| 400 | SMS send failed (verify/send only) |
| 404 | Unknown verification_id, or it belongs to a different account |
| 410 | Code expired — call verify/send again for a new one |
| 429 | Too 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.