Phone verification (OTP)
Send a verification code
POST
https://api.smsedge.com/v1/phone-verifier/send-verification-code/Sends a one-time code by SMS to a phone number and returns a request_id to verify it with.
Use this to prove that a user has the phone number they gave you, for example at signup.
- Call this endpoint with the user's number. Keep the
request_idfrom the response. - The user gets an SMS with a 6-digit code.
- The user types the code in your app.
- Send the code and the
request_idto Verify a code.
- The code expires after 5 minutes. The user has 3 attempts.
- Each sent code is charged at the SMS price for the country. You need a positive balance.
- Limits: 3 codes for each number in 15 minutes. For each account: 5 codes in 1 minute, 50 in 1 hour and 500 in 24 hours.
Body params (JSON)
numberstringrequiredPhone number of the user, in international or local format.
countrystringrequiredISO 3166-1 alpha-2 country code or SMSEdge country ID of the number.
brandstringoptionalYour brand or app name. Maximum 14 characters.
Default:
Phone Verify
Responses
- 200The code was sent.
- 400A parameter is missing or not valid, a limit was reached, or there is no route for the country.
- 402Your balance is too low.
- 500The code could not be sent. Try again later.
curl -X POST "https://api.smsedge.com/v1/phone-verifier/send-verification-code/" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"447700900123","country":"GB"}'[
{
"success": true,
"data": {
"request_id": "3f2b8c1e-7a4d-4e9b-9c21-5d6f7a8b9c0d",
"normalized_number": "447700900123"
},
"errors": [],
"response": {
"code": 200,
"description": "OK",
"date": "2026-11-16 14:50:00"
},
"api": {
"version": "v1",
"module": "phone-verifier",
"function": "send-verification-code"
},
"user": {
"id": 12345
}
}
]All requests need your API key in the X-API-KEY header. See Authentication.