Documentation version: Latest (v1)
API endpoint
Legacy OTP send alias
Compatibility alias for instant OTP send.
POST/api/v1/otp/send
Auth: Same as /api/v1/instant-otp/send
Legacy alias. Prefer /api/v1/instant-otp/send for new integrations.
Required headers
| Header | Required | Value | Description |
|---|---|---|---|
| Authorization | Yes | Bearer <token> | API key, server OTP key, or public OTP token depending on endpoint. |
| Content-Type | Yes | application/json | All POST requests expect JSON payloads. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Target email. | |
| expiresInSeconds | number | No | Expiry in seconds. |
| otpDigits | number | No | OTP length. |
Code examples (all supported languages)
Snippets use placeholder tokens. Replace them with real credentials from your dashboard.
curl -X POST "https://risumail.risu.in/api/v1/otp/send" \
-H "Authorization: Bearer risu_otp_PUBLIC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","expiresInSeconds":600}'Response schema
Canonical schema inferred from the documented success payload. Copy this block when generating typed clients.
{
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"required": [
"sessionId",
"expiresAt",
"sent"
],
"properties": {
"sessionId": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"sent": {
"type": "boolean"
}
}
}
}
}Success response example
{
"success": true,
"data": {
"sessionId": "otp_sess_01J...",
"expiresAt": "2026-04-19T11:50:00.000Z",
"sent": true
}
}Common error cases
| Status | Code | When |
|---|---|---|
| 403 | OTP_PUBLIC_IP_NOT_ALLOWED | Public token allowlist denied. |
| 429 | OTP_RATE_LIMITED | OTP rate limit exceeded. |
Implementation notes
- Legacy alias only. Prefer /api/v1/instant-otp/send in new integrations.