curl --request POST \
--url https://verify-api.smsmanager.com/v1/validations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"phoneNumber": "1234567890"
}
'{
"token": "61591bd88d8fbe7736bca535809d1216dd71cb0b5cbf2b07e5a08adfbeb5d35b",
"status": "pending",
"expiresAt": "2024-01-01T00:10:00.000Z",
"timestamp": "2024-01-01T00:00:00.000Z"
}Start phone validation
Initiates a new phone number validation by sending an message with a verification code. Returns a validation token that must be used for subsequent verification.
curl --request POST \
--url https://verify-api.smsmanager.com/v1/validations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"phoneNumber": "1234567890"
}
'{
"token": "61591bd88d8fbe7736bca535809d1216dd71cb0b5cbf2b07e5a08adfbeb5d35b",
"status": "pending",
"expiresAt": "2024-01-01T00:10:00.000Z",
"timestamp": "2024-01-01T00:00:00.000Z"
}Authorizations
Your tenant's API key
Body
The phone number to validate (digits only, including country code)
^[1-9]\d{6,14}$"1234567890"
Turnstile verification token (required if tenant has requireTurnstile enabled)
"0.abcdefghijklmnopqrstuvwxyz"
Optional custom payload to attach to the validation
Show child attributes
Show child attributes
{ "userId": "user123", "source": "checkout" }
Response
Validation started successfully
Unique validation token to use for verification
"val_7af7215261b8497cb355e617b13f4ef2"
Current status of the validation
pending, code_sent, verified, failed, expired "pending"
When this validation expires (typically 10 minutes)
"2024-01-01T00:10:00.000Z"
When this validation was started (used for HMAC verification)
"2024-01-01T00:00:00.000Z"
HMAC proof for offline verification (only if tenant has verificationSecret)
"a2c4e6f8b0d2e4f6a8c0e2f4b6d8f0a2c4e6f8b0d2e4f6a8c0e2f4b6d8f0a2"
Was this page helpful?