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

HeaderRequiredValueDescription
AuthorizationYesBearer <token>API key, server OTP key, or public OTP token depending on endpoint.
Content-TypeYesapplication/jsonAll POST requests expect JSON payloads.

Request body

FieldTypeRequiredDescription
emailstringYesTarget email.
expiresInSecondsnumberNoExpiry in seconds.
otpDigitsnumberNoOTP 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

StatusCodeWhen
403OTP_PUBLIC_IP_NOT_ALLOWEDPublic token allowlist denied.
429OTP_RATE_LIMITEDOTP rate limit exceeded.

Implementation notes

  • Legacy alias only. Prefer /api/v1/instant-otp/send in new integrations.