How it works
The verification flow involves two server-side API calls and one user action:- Your server calls
POST /v1/validationswith the phone number to verify → you receive atoken. - SmsManager sends a 6-digit OTP to the phone number via SMS.
- The user receives the SMS and types the code into your UI.
- Your server calls
POST /v1/validations/{token}/verifywith the code the user entered. - On success, the response includes
verified: true, the confirmedphoneNumber, and — if your account has a verification secret configured — an HMACproofyou can use for offline verification later.
Base URL and authentication
- Base URL:
https://verify-api.smsmanager.com - Authentication header:
X-API-Key: YOUR_API_KEY
POST /v1/verify-proof require the X-API-Key header.
Step-by-step integration
1
Start a validation
Call Store the
POST /v1/validations with the phone number you want to verify. The phone number should be in international format without the leading +.cURL
Response
token — you will need it in the next step. The expiresAt timestamp tells you how long the session is valid. After expiry, the code is no longer accepted and the user must restart the flow.2
User receives the OTP code via SMS
SmsManager automatically sends a 6-digit code to the phone number. Display a code-entry field in your UI and wait for the user to submit it. You do not need to do anything on the server side during this step.
3
Verify the code
Once the user submits the code, call Check the
POST /v1/validations/{token}/verify — replacing {token} with the token from step 1 — and pass the code in the request body.cURL
Response — success
verified field. If true, the phone number is confirmed and you can proceed. If false, the code was wrong — see Error handling below.4
Use the result in your application
Once
verified: true, mark the phone number as confirmed in your database and proceed with your application flow — creating the user account, unlocking a feature, completing a transaction, and so on. If your account has a verificationSecret configured, also store the proof field for offline verification (see below).HMAC offline proof
If your account has averificationSecret configured in the SmsManager dashboard, the verify response includes an additional proof field alongside the standard fields. The proof is an HMAC signature over the verification data.
The offline proof is useful when you want a second server (for example, a microservice or a mobile app backend) to confirm that a verification really happened, without making another API call and without needing access to your API key.
To verify a proof offline, call POST /v1/verify-proof — this endpoint requires no authentication:
cURL
Response — proof valid
The
proof approach lets you hand the verification result (along with the proof) to the client, which can then present it to any of your services. Each service can independently confirm authenticity using the shared verificationSecret, without a central state store.Error handling
Always check the HTTP status code alongside the
verified boolean. A 200 response with verified: false means the code was wrong but the session is still active (unless too_many_attempts is returned).
Rate limiting
The Verify API enforces rate limits at three levels to prevent abuse:- Per account — a global cap on verifications initiated per minute.
- Per country — limits on how many verifications can be sent to a specific country code.
- Per phone number — a cooldown after multiple failed attempts or repeated verifications of the same number.
429 response, back off and retry after a delay. Display a user-friendly message (“Too many attempts — please wait a moment and try again”) rather than a technical error.
Full cURL examples
Next steps
Send SMS
Send transactional SMS messages including OTP codes.
Webhooks
Track delivery of your OTP SMS messages in real time.
Batch Sending
Send messages to multiple recipients in a single API call.
Send WhatsApp
Deliver OTP codes via WhatsApp template messages.