Create User
POST
/admin/users/
const url = 'https://example.com/admin/users/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","role":"viewer","username":"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 https://example.com/admin/users/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "role": "viewer", "username": "example" }'Create a new user with the specified role (admin only).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
AdminUserCreate
object
password
required
Password
Initial password (policy: min 12 chars, 3+ character classes). The user can change this after first login.
string
role
Role
User role: ‘admin’, ‘editor’, or ‘viewer’. Defaults to ‘viewer’.
string
username
required
Username
Login username (3-150 chars). Must be unique across the system.
string
Responses
Section titled “ Responses ”Successful Response
Media type application/json
UserResponse
object
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
is_active
required
Is Active
boolean
roles
required
Roles
Assigned role names, e.g. [‘admin’, ‘editor’]
Array<string>
status
required
Status
Account status: active, pending, suspended, or deactivated.
string
username
required
Username
string
Example
{ "status": "active"}Bad request — invalid query parameters or payload
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}Forbidden — caller lacks access to this resource
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}Not found
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}Validation error
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}Internal server error
ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
Example
{ "type": "about:blank"}