Phone verification (OTP)
Verify a code
POST
https://api.smsedge.com/v1/phone-verifier/verify-code/Checks the code that the user typed against the code that was sent.
A 200 response means the code is correct and the number is verified. Each wrong code uses one of the 3 attempts. After 3 wrong codes, send a new code with Send a verification code.
Body params (JSON)
request_idstringrequiredThe request_id from Send a verification code.
codestringrequiredThe code that the user typed.
Responses
- 200The code is correct.
- 400The code is wrong or expired, the number is already verified, or no attempts are left.
- 403The request_id belongs to a different account.
- 404The request_id is not known.
curl -X POST "https://api.smsedge.com/v1/phone-verifier/verify-code/" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"request_id":"3f2b8c1e-7a4d-4e9b-9c21-5d6f7a8b9c0d","code":"482915"}'[
{
"success": true,
"data": [],
"errors": [],
"response": {
"code": 200,
"description": "OK",
"date": "2026-11-16 14:52:00"
},
"api": {
"version": "v1",
"module": "phone-verifier",
"function": "verify-code"
},
"user": {
"id": 12345
}
}
]All requests need your API key in the X-API-KEY header. See Authentication.