Delete Role
delete_rolePermanently delete an access role, addressed by its key (or id) from list_roles. THIS IS IRREVERSIBLE. People who hold the role are NOT moved to another one — reassign them first with update_user, or they are left holding a role that no longer exists. Flag rules and app code that check the role key stop matching anyone. The default role and the OWNER role cannot be deleted: to delete the current default, make another role the default with set_default_role first. Requires confirmation: pass confirm set to the exact role key, and only after the user has explicitly asked for the deletion — do not supply it on your own initiative. dryRun: true previews it first — the role and the privileges it grants — without deleting anything or needing confirm. Fails with ROLE_NOT_FOUND when nothing matches. Same as bridge role delete. 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 |
|---|---|---|---|
| id | No | Role id from list_roles, instead of key. | |
| app | No | Id of the Bridge app to act on for this call (see list_apps). Omit to use the current app. | |
| key | No | Role KEY from list_roles, e.g. "EDITOR". Pass this or id, not both. | |
| dryRun | No | true previews what the deletion would affect and deletes nothing — no confirm needed. Do this first and show the user the result. Needs the same privilege as the deletion itself. | |
| confirm | No | Repeat the exact key of the resource being deleted, as confirmation. Required to delete; not needed with dryRun. This is a deliberate safety step — do NOT guess it or copy it from a fuzzy match. If you are not certain, list the resources first and ask the user which one they mean. |