Two JSON endpoints handle the whole flow: create and deliver a code, then verify it. Every request is authenticated with an API key from your dashboard.
https://www.otp.dearprime.in/api/v1
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/send-otp | Generate and deliver a one-time passcode |
| POST | /api/v1/verify-otp | Check a code against a request ID |
Only POST is accepted; anything else returns METHOD_NOT_ALLOWED (405). Send Content-Type: application/json.
curl -X POST https://www.otp.dearprime.in/api/v1/send-otp \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","email":"user@example.com","purpose":"login"}'
curl -X POST https://www.otp.dearprime.in/api/v1/verify-otp \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","request_id":"REQ_XXXX","otp":"123456"}'
Every response is JSON with a boolean success field. Failures also carry an error object.
{
"success": false,
"error": { "code": "INVALID_OTP", "message": "The code entered is incorrect." }
}