Create Privilege
create_privilegeCreate a new privilege: a named permission roles can grant. Arguments: key (permanent, upper-case, e.g. "REPORTS_VIEW" — code and flag rules compare it exactly) and description (what it allows). A new privilege is granted by no role until you add it with update_role (pass the full privilege list) or create_role. Same as bridge privilege create. 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 | Privilege KEY: permanent, upper-case, e.g. "REPORTS_VIEW". | |
| description | No | What people holding this privilege may do. |