Role
Roles group permissions and are assigned to users directly or on a team.
📄️ Get Role
Retrieves one role. Set `includeHolders: true` to also get its holders, one entry per user and team the role is applied on (no team for a direct assignment), the matching `members`, and, for callers with the `role:manage` permission, the role's permission scopes. `extended: true` alone returns only `members`, read from the search index. Requires the `role:list` permission in the role's company. Use `/role/list` to find a role ID by name, and `/user/get` to see every role one user holds and on which team.
📄️ List Roles
Lists every role in a company, including roles nobody holds. Set `includeHolders: true` to also get each role's `holderCount` (active users who hold it directly or on any team; it can lag an assignment change by a few seconds) and `autoEnrollPrograms` (active programs that enroll a user when they are assigned the role). Omit `companyId` for your own company. Archived roles are excluded unless `showArchived` is set. Requires the `role:list` permission. Use this to check whether a role exists by name; use `/role/get` with `includeHolders: true` to see who holds a role.