Self-service account creation
POST /auth/register
Anonymous endpoint. Creates a new local account when
sysconfig auth.self_registration.enabled is true,
otherwise returns 403. Username must match
^[a-zA-Z0-9_-]{3,32}$ + be globally unique. Password
must satisfy the policy block. Email is required.
When auth.self_registration.require_email_verification
is true (the default), the user is created with
email_verified_at IS NULL and the response is 202 —
they cannot sign in until they click the verification
link in the email we send. With verification off, the
response is 200 + a session cookie.
Rate-limited by both IP and attempted email so spam clients can’t enumerate.
Request Body required
Section titled “Request Body required ”Self-registration payload. Validation is server-side authoritative; the frontend mirrors the same regexes for early UX feedback.
object
Must satisfy the install’s sysconfig password policy.
Optional display name; defaults to the username when empty.
Responses
Section titled “ Responses ”Account created + signed in (verification disabled).
object
How the caller was authenticated for this request.
User’s language pref (BCP47). Empty string = follow system / browser. Joined from user_profiles at /auth/me time so the frontend can hydrate the language store on first paint without a separate round-trip.
User’s theme pref. Empty string = follow system. Same
“join on /auth/me” rationale as language.
Non-null when the session was minted via POST /admin/users/{ref}/impersonate. Carries the acting admin’s ref + username so the persistent “you are acting as @target” banner can render without a separate round-trip.
object
Account created; verification email sent. Caller must verify before login.
202 response when require_email_verification is on. The caller is not signed in yet; the verification link they receive by email completes the flow.
object
Human-readable next-step prompt.
Malformed request
object
Human-readable error summary
Example
the request could not be completedSelf-registration is disabled on this install.
object
Human-readable error summary
Example
the request could not be completedUsername or email already in use.
object
Human-readable error summary
Example
the request could not be completedRate-limited; retry after a brief pause.
object
Human-readable error summary
Example
the request could not be completed