Create a user
POST
/v1/users
const url = 'http://localhost:8080/v1/users';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"example","displayName":"example","password":"example","roles":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/v1/users \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "displayName": "example", "password": "example", "roles": [ "example" ] }'Creates a user with email, displayName, an optional password (omit for email-link-only sign-in) and roles (admin, manager, specialist, boarding_checker, auditor_readonly, api_service); the creation is recorded as an auth event. Administrators only. 400 for invalid fields or a password shorter than the policy minimum, 409 when the email is already taken, 422 when the email domain is not allowed by policy.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
string
displayName
string
password
Optional: omit for OTP-only users.
null | string
roles
Array<string>
Examplegenerated
{ "email": "example", "displayName": "example", "password": "example", "roles": [ "example" ]}Responses
Section titled “Responses”Created
Media typeapplication/json
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
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "example", "displayName": "example", "roles": [ "example" ], "isActive": true, "lastLoginAt": "2026-04-15T12:00:00Z", "totpEnrolled": true}