Users

Create first admin (one-time setup)

Changed on

First-run setup: create the first admin user and auto-login.

Unauthenticated by design — there is no admin to authenticate as yet. The operation self-closes once any user exists (returns 410 setup_already_complete thereafter), so it is safe to expose only during first boot.

post/users:create-admin

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /users:create-admin
  • Auth: none required

Request body

emailstring required

Email address of the first admin.

first_namestring

First name of the first admin; defaults to Admin.

last_namestring

Last name of the first admin; defaults to User.

passwordstring required

Password for the first admin.

Example request

{
  "email": "admin@example.com",
  "first_name": "Ada",
  "last_name": "Lovelace",
  "password": "example-password"
}

Response

Successful Response

access_tokenstring required

Signed JWT to send as a bearer token on subsequent requests.

expires_ininteger required

Lifetime of the access token in seconds.

must_change_passwordboolean required

Whether the user must change their password before using other endpoints.

token_typestring required

Token type; always bearer.

Example response

{
  "access_token": "example-access-token",
  "expires_in": 3600,
  "must_change_password": false,
  "token_type": "bearer"
}

Changes