Skip to content

Create the first administrator

POST
/v1/setup/admin
curl --request POST \
--url http://localhost:8080/v1/setup/admin \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "displayName": "example", "password": "example" }'

Step 1. Anonymous and rate-limited per address: creates the first admin user, marks setup in_progress and returns an access/refresh token pair so the wizard continues signed in. 409 once an administrator exists (sign in instead), 400 when the password is shorter than auth.password_min_length or a field is invalid.

Media typeapplication/json
object
email
string
displayName
string
password
string
Examplegenerated
{
"email": "example",
"displayName": "example",
"password": "example"
}

OK

Media typeapplication/json

Access token (15 min default) + rotating refresh token, returned in the body and held in memory by the SPA.

object
accessToken
required
string
accessExpiresAt
required
string format: date-time
refreshToken
required
string
refreshExpiresAt
required
string format: date-time
user
required
object
id
required
string format: uuid
email
required
string
displayName
required
string
roles
required
Array<string>
isActive
required
boolean
lastLoginAt
required
null | string format: date-time
totpEnrolled
required
boolean
Examplegenerated
{
"accessToken": "example",
"accessExpiresAt": "2026-04-15T12:00:00Z",
"refreshToken": "example",
"refreshExpiresAt": "2026-04-15T12:00:00Z",
"user": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"email": "example",
"displayName": "example",
"roles": [
"example"
],
"isActive": true,
"lastLoginAt": "2026-04-15T12:00:00Z",
"totpEnrolled": true
}
}