Update a standing policy rule
Enable or disable a rule, or replace its matcher or action. The event and scope are fixed at creation, because changing either makes it a different rule.
Authorizations
JWT authentication token
Path Parameters
Body
Every field is optional; only what is supplied changes.
What happens when the matcher matches. Each action only runs on the events that read it, and a pairing outside that is refused.
Which calls the rule covers. An absent field matches anything, so an empty
matcher covers everything within its scope. Prefer path for anything
about a file or directory: it is checked against every string in the call,
so one rule covers a read, a write, and a shell command alike.
Response
Rule updated
What happens when the matcher matches. Each action only runs on the events that read it, and a pairing outside that is refused.
The moment in a task where the rule is checked.
PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, SessionStart, SubagentStop, Stop Locked workspace policy cannot be changed through this API.
Which calls the rule covers. An absent field matches anything, so an empty
matcher covers everything within its scope. Prefer path for anything
about a file or directory: it is checked against every string in the call,
so one rule covers a read, a write, and a shell command alike.
Who the rule applies to. Rules from every scope are evaluated together.
org, repo, user, thread Whether this caller may change or delete the rule. Reads are wider than writes.

