v15

latestOpenAPI 3.0.0MIT Licenseraw.githubusercontent.com2026-08-016088119.5 KB
authentication

Sign in with email OTP

Initiate email-based one-time password authentication. Sends an OTP to the specified email address. If the user doesn't exist and AUTH_DISABLE_AUTO_SIGNUP is not set, a new account will be created with the provided options. When AUTH_DISABLE_AUTO_SIGNUP is enabled, users must use the /signup/otp/email endpoint to register first.

post/signin/otp/email

Request body

emailstring email required

A valid email

Example request

{
  "email": "john.smith@nhost.io",
  "options": {
    "allowedRoles": [
      "me",
      "user"
    ],
    "defaultRole": "user",
    "displayName": "John Smith",
    "locale": "en",
    "metadata": {
      "firstName": "John",
      "lastName": "Smith"
    },
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}

Response

OTP sent to the user's email. To prevent account enumeration, this response is also returned without side effects when the email is not registered and AUTH_DISABLE_AUTO_SIGNUP is enabled.

'OK' required