Create Role
create_roleCreate a new access role. Arguments: name (display name), key (stable identifier code references, e.g. "ADMIN"), description, privileges (list of privilege KEYS the role grants — see list_roles for the keys existing roles use), and isDefault (make this the role assigned to people added to a workspace without a role named; default false). Use update_role to change an existing role and set_default_role to make an existing role the default. What a role can do is only the app's default setup until you have read it here. Control access with a flag rule on a privilege (preferred) or on the role key, never with a hard-coded role check in app code. A privilege rule matches the whole key: privileges contains "REPORTS_VIEW" does not match REPORTS_VIEW_ALL. Before writing app code that consumes this, call get_integration_guide with topic=team and the framework the app uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Id of the Bridge app to act on for this call (see list_apps). Omit to use the current app. | |
| key | Yes | Role KEY: permanent, upper-case, e.g. "EDITOR". Code and flag rules compare it exactly. | |
| name | Yes | Display name, e.g. "Editor". | |
| isDefault | No | Make this the default role for new users (default false). | |
| privileges | No | Privilege keys the role grants (default: none). | |
| description | No | What people with this role do. |