Set Default Role
set_default_roleMake an existing role the default: the role a person gets when they are added to a workspace without a role named (the first person in a workspace is always its Owner). Argument: key (a role KEY from list_roles, e.g. "MEMBER"). The previous default stops being the default. Which role is the default is the developer's decision — ask, do not pick one; read the app's real roles with list_roles first rather than assuming what a role grants from its name (in the default setup a new app defaults to MEMBER). Returns the updated role. Fails with ROLE_NOT_FOUND, listing the app's role keys, when no role has that key. 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 from list_roles, e.g. "MEMBER". |