/roles resource lets you define and manage the permission sets that govern what staff members can do in Avalex. A role is a named bundle of permission strings — such as customers:read or licenses:write — that you assign to one or more staff accounts. By centralising permissions in roles, you can update access levels across your entire team by editing a single record.
Required Permissions
List All Roles
string
required
Bearer
<token> or Basic credentials.Create a Role
string
required
Bearer
<token> or Basic credentials.string
required
Human-readable name for the role (e.g.
Support Agent).string[]
required
Array of permission strings granted to this role. See the full list of valid permissions below.
Get a Role by ID
string
required
The unique role ID (e.g.
role_support).404 Not Found if no role with that ID exists.
Update a Role
string
required
The unique role ID.
permissions array is replaced entirely with the value you provide. Returns 404 Not Found if the role does not exist.
Changes to a role take effect immediately for all staff members assigned to it. Removing a permission from a role revokes that access across every staff account that holds the role.
Delete a Role
string
required
The unique role ID.
204 No Content on success and 404 Not Found if the ID does not exist.
StaffRole Schema
Full Schema Example
Valid Permission Strings
The following permission strings are recognised by Avalex. Each string follows theresource:action pattern.
