Documentation version: Latest (v1)

API endpoint

Legacy OTP verify alias

Compatibility alias for instant OTP verify.

POST/api/v1/otp/verify

Auth: Same as /api/v1/instant-otp/verify

Legacy alias. Prefer /api/v1/instant-otp/verify 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
sessionIdstringYesSession id from send call.
emailstringYesEmail used during send.
codestringYesOTP code.

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/verify" \
  -H "Authorization: Bearer risu_otp_PUBLIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"otp_sess_01J...","email":"user@example.com","code":"123456"}'

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": [
        "verified"
      ],
      "properties": {
        "verified": {
          "type": "boolean"
        }
      }
    }
  }
}

Success response example

{
  "success": true,
  "data": {
    "verified": true
  }
}

Common error cases

StatusCodeWhen
400INVALID_CODECode mismatch or malformed input.
404SESSION_NOT_FOUNDSession expired or invalid.

Implementation notes

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