Create User
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 ”object
Initial password (policy: min 12 chars, 3+ character classes). The user can change this after first login.
User role: ‘admin’, ‘editor’, or ‘viewer’. Defaults to ‘viewer’.
Login username (3-150 chars). Must be unique across the system.
Responses
Section titled “ Responses ”Successful Response
object
Per-user quota usage: current consumption vs configured caps.
object
Assigned role names, e.g. [‘admin’, ‘editor’]
Account status: active, pending, suspended, or deactivated.
Example
{ "status": "active"}Bad request — invalid query parameters or payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks access to this resource
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request