Documentation

Authentication

Generate a key in your dashboard under API keys. The full key is shown once - store it in your server configuration, never in client-side code.

Header (recommended)

curl -X POST https://www.otp.dearprime.in/api/v1/send-otp \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"email":"user@example.com"}'

Body parameter

{ "api_key": "YOUR_API_KEY", "email": "user@example.com" }

If both are supplied, the body value wins.

Key states

SituationCodeHTTP
Missing or malformed keyINVALID_API_KEY401
Key revoked or disabledAPI_KEY_DISABLED403
Account suspendedACCOUNT_SUSPENDED403
Too many calls for this keyRATE_LIMIT_EXCEEDED429

Good practice

  • Call the API from your backend only.
  • Rotate a key immediately if it may have leaked; revoking takes effect on the next request.
  • Use separate keys per environment so logs stay readable.

Next: Send OTP