Finalize first-run setup (admin + site + SMTP)
POST /setup/complete
One-shot transactional endpoint that creates the first admin
user, writes site identity (display name, base URL), and
optionally writes SMTP credentials. Only callable while no
system.admin user exists; subsequent calls return 409.
SMTP is optional — pass null for the smtp field if email
is not configured yet. The admin UI surfaces email-dependent
features (password reset, notifications) as disabled until
SMTP is filled in later.
Request Body required
Section titled “Request Body required ”object
object
Example
adminExample
admin@example.comExample
Site Administratorobject
Example
Acme Art ReviewsAbsolute URL the site is reachable at. Used to build outgoing links (e.g., password-reset emails). May be empty at install time and filled in later.
Example
https://art.example.comobject
Example
smtp.example.comExample
587Example
starttlsWrite-only. Provide to set or rotate the SMTP password;
omit (or send empty string) on PATCH to keep the current
value. The response never echoes this field — read
password_set instead to check whether one is on file.
Stored at rest encrypted via the AA_MASTER_KEY-backed
atrest package; never sent back to clients.
True when a password is currently stored. Set by the server on GET responses; ignored if sent on PATCH.
Example
ArtSite <noreply@example.com>Responses
Section titled “ Responses ”Setup complete; first admin is now active
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
Malformed request
object
Human-readable error summary
Example
the request could not be completedSystem already has an administrator; setup is not available
object
Human-readable error summary
Example
the request could not be completedUnexpected server error
object
Human-readable error summary
Example
the request could not be completed