Skip to main content
The /staff endpoints let you manage the human operators who access your Avalex dashboard and API. You can list all staff accounts, look up an individual member, reassign roles, deactivate or reactivate accounts, and permanently remove a staff member. All management actions require the staff:manage permission, while read-only lookups require staff:read.
Creating a new staff account requires a valid, unused registration key. Registration keys are generated by the Master Admin and consumed on first use. See the Registration Keys page for details.

Required Permissions


List All Staff

string
required
Bearer <token> or Basic credentials.
Returns an array of all staff accounts as StaffPublicView objects.
Response — 200 OK

Get a Staff Member by ID

string
required
The UUID of the staff member (e.g. e9f0d1c2-b3a4-5678-cdef-90ab12cd34ef).
Returns a single StaffPublicView. Responds with 404 Not Found if no staff member with that ID exists.
Response — 200 OK

Update Staff Roles

string
required
The UUID of the staff member.
string[]
required
Complete list of role IDs to assign to this staff member. Replaces the current set entirely.
Replaces the staff member’s role assignments with the provided array. Returns 404 Not Found if the staff member does not exist.
This endpoint replaces all existing role assignments. To add a role without removing others, retrieve the current roleIds first, append the new ID, then submit the full updated array.
Response — 200 OK

Update Staff Active Status

string
required
The UUID of the staff member.
boolean
required
Set to false to deactivate the account, or true to reactivate it.
Toggles the active status of a staff account. Deactivated accounts cannot authenticate or use the API. Returns 404 Not Found if the staff member does not exist.
Response — 200 OK

Delete a Staff Member

string
required
The UUID of the staff member to delete.
Permanently removes the staff account. Returns 204 No Content on success and 404 Not Found if the ID does not exist.
This action is irreversible. The deleted staff member will need to register a new account using a fresh registration key if access is required again.
Response — 204 No Content

Register a New Staff Member

This endpoint is public and does not require an authenticated session, but it does require a valid, unused registration key issued by the Master Admin.
string
required
A single-use registration key generated via POST /admin/registration-keys.
string
required
Desired username for the new staff account.
string
required
Email address for the new staff account.
string
required
Password for the new account. Must be at least 8 characters long.
string[]
required
Array of role IDs to assign to the new staff member on registration.
Creates a new staff account and returns a StaffPublicView. The registration key is consumed and cannot be reused.
Response — 201 Created

Error Responses

400 Bad Request — Password too short:
403 Forbidden — Key not recognised:
403 Forbidden — Key already consumed:

StaffPublicView Schema

Full Schema Example