POST https://otp.dearprime.in/api/v1/verify-otp
Checks a code against the request ID returned by send-otp. A successful verification consumes the code, so it cannot be replayed.
| Field | Type | Required | Notes |
|---|---|---|---|
| api_key | string | Yes* | *Or the X-API-Key header. |
| request_id | string | Yes | The ID returned by send-otp. |
| otp | string | Yes | The code the user entered. |
{
"api_key": "YOUR_API_KEY",
"request_id": "REQ_8F2A1C4B9D",
"otp": "123456"
}
{
"success": true,
"verified": true,
"message": "OTP verified successfully"
}
| Code | HTTP | Meaning |
|---|---|---|
| VALIDATION_ERROR | 422 | request_id or otp missing / malformed. |
| REQUEST_NOT_FOUND | 404 | Unknown request ID, or it belongs to another account. |
| OTP_EXPIRED | 410 | The code passed its expiry window. |
| ALREADY_VERIFIED | 409 | This request was already verified. |
| INVALID_OTP | 401 | Wrong code; attempts remaining are decremented. |
| MAX_ATTEMPTS_REACHED | 429 | Attempt limit for this request exhausted - send a new code. |
| RATE_LIMIT_EXCEEDED | 429 | Too many verify calls from this IP for the same request. |
Failed responses include "verified": false alongside the error object.