Create the initial super admin
POST
/setup
const url = 'https://your-server.example/api/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"example","password":"example","display_name":"example","email":"hello@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-server.example/api/setup \ --header 'Content-Type: application/json' \ --data '{ "username": "example", "password": "example", "display_name": "example", "email": "hello@example.com" }'Allowed only when no users exist. Returns 409 once set up.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
username
required
string
password
required
string
display_name
string
email
string format: email
Example generated
{ "username": "example", "password": "example", "display_name": "example", "email": "hello@example.com"}Responses
Section titled “Responses”User created.
Media typeapplication/json
object
username
string
role
string
Example
{ "role": "super_admin"}Invalid request.
Media typetext/plain
string
State conflict.
Media typetext/plain
string