/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
Returns an array of all role records in your Avalex account.Create a Role
Array of permission strings granted to this role. See the full list of valid permissions below.
Get a Role by ID
Returns a single role record. Responds with404 Not Found if no role with that ID exists.
Update a Role
Performs a full replacement of the role record. Thepermissions 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
Permanently removes the role record. Returns204 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.
