Avycenna

Send OTP code

Send a 6-digit one-time passcode to the given email address. Works for both returning users (sign-in) and new users (sign-up) — no account needs to exist beforehand. The code is valid for **10 minutes**. Call `/otp/verify` next to complete authentication.

POST
/api/v1/auth/otp/send

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/otp/send" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
null
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string"    }  ]}