Skip to main content
To create a local account, send your email address, a password of at least eight characters, and an optional display name to POST /auth/register. A verification email is sent immediately, and the response tells you which frontend route to navigate to so your user can enter the code. You must verify your email before you can log in — any login attempt with an unverified address returns a 403 EmailVerificationRequiredError.

POST /auth/register

Creates a new local user account and starts the email verification flow.

Request body

string
required
The email address for the new account. Must be a valid email format and not already registered.
string
required
The account password. Must be at least 8 characters. If the password does not meet strength requirements, the response includes a list of unmet requirements.
string
An optional display name shown in the user profile. Must be a non-empty string if provided.

Response — 201 Created

string
required
The email address of the newly created account.
string
required
The frontend route to navigate to so the user can complete email verification (e.g. /verify-email).

Errors

Response

POST /auth/verify-email

Submits the verification code sent to the user’s email address. On success, the account is marked as verified and a redirectTo route is returned so you can navigate the user to their next step (e.g. the login page or dashboard).

Request body

string
required
The verification code from the email. Codes are single-use and expire after a short window.

Response — 200 OK

string
required
The frontend route to navigate to after verification succeeds (e.g. /home).

Errors


POST /auth/resend-verification

Replaces the pending verification code and resends the email. Use this when a user did not receive the original email or the code has expired. This endpoint requires no request body — the verification session is tracked server-side. If the session is missing or expired, the user must restart registration.

Response — 200 OK

string
required
The email address a new verification code was sent to.
string
required
The frontend route to continue the verification flow (e.g. /verify-email).

Errors