Skip to main content

Start Verification

Send an SMS OTP to a phone number to begin the verification process.

Endpoint​

POST https://exoverify.exotel.com/v2/accounts/{account_sid}/verifications/sms

Headers​

HeaderValue
AuthorizationBasic <base64(Application_ID:Application_Secret)>
Content-Typeapplication/json

Request Parameters​

ParameterRequiredTypeDescription
application_idMandatoryStringYour ExoVerify SMS App ID
phone_numberMandatoryStringPhone number to verify (E.164 format)
replace_varsOptionalArrayArray of strings for template variable substitution

Code Examples​

curl -X POST "https://exoverify.exotel.com/v2/accounts/<account_sid>/verifications/sms" \
-H "Authorization: Basic <base64_credentials>" \
-H "Content-Type: application/json" \
-d '{
"application_id": "your_app_id",
"phone_number": "+919876543210"
}'

Response​

HTTP 200

{
"verification_id": "ver_abc123def456",
"phone_number": "+91987654XXXX",
"application_id": "your_app_id",
"account_sid": "your_account_sid",
"max_attempts": 10,
"expiration_in_seconds": 60,
"date_created": "2024-01-15T10:30:00Z",
"date_updated": "2024-01-15T10:30:00Z"
}

Response Fields​

FieldTypeDescription
verification_idStringUnique ID — use this to verify the OTP later
phone_numberStringMasked phone number
application_idStringYour ExoVerify app ID
max_attemptsIntegerMaximum OTP entry attempts allowed (10)
expiration_in_secondsIntegerOTP validity window (60 seconds)

Error Codes​

HTTPCodeDescription
4001001Missing mandatory parameter
4011010Authentication failed — invalid App ID or Secret
4291030Throttle limit exceeded — too many requests
note

The verification_id is required for the next step — Verify OTP. Store it in your session or pass it to your frontend.

Try It​