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.
curl -X POST https://www.otp.dearprime.in/docs/api/v1/send-otp \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"email":"user@example.com"}'
{ "api_key": "YOUR_API_KEY", "email": "user@example.com" }
If both are supplied, the body value wins.
| Situation | Code | HTTP |
|---|---|---|
| Missing or malformed key | INVALID_API_KEY | 401 |
| Key revoked or disabled | API_KEY_DISABLED | 403 |
| Account suspended | ACCOUNT_SUSPENDED | 403 |
| Too many calls for this key | RATE_LIMIT_EXCEEDED | 429 |