Herald
OpenapiAuth

Send an email OTP login code.

Issues a one-time verification code for an existing active user, or — if the Realm has OTP auto-register enabled — for an unregistered email after consent is expressed. Partially enumeration-resistant: a 200 is returned for a known but non-active user (no code sent). An explicit 409 is still returned for an unregistered email when auto-register is off — the same registration-status bit the register endpoint exposes by design (both paths sit behind Turnstile and per-email/IP rate limits).

POST
/api/auth/{realmId}/login/email-otp/send

Issues a one-time verification code for an existing active user, or — if the Realm has OTP auto-register enabled — for an unregistered email after consent is expressed. Partially enumeration-resistant: a 200 is returned for a known but non-active user (no code sent). An explicit 409 is still returned for an unregistered email when auto-register is off — the same registration-status bit the register endpoint exposes by design (both paths sit behind Turnstile and per-email/IP rate limits).

Path Parameters

realmId*string

Realm ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

agreements?array<>|null
clientId*string
email*string
turnstileToken?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/auth/string/login/email-otp/send" \  -H "Content-Type: application/json" \  -d '{    "clientId": "string",    "email": "string"  }'
{  "expiresInSeconds": 0,  "message": "string"}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "agreements": [    {      "agreement_type": "string",      "effective_at": "2019-08-24T14:15:22Z",      "external_url": "string",      "mode": "full_text",      "summary": "string",      "title": "string",      "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",      "version_no": 0    }  ],  "code": "string",  "consentRequired": true,  "message": "string"}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}