Skip to main content
PUT
Replaces the entire policy. Omitted fields reset to defaults; they do not retain stored values.

Authentication

X-Agent-ID plus a signed x-agent-proof with scope: "write". See proof authentication. Requires a wallet session signed by the agent wallet. An access token can only read; writes return 403 action_policy_read_only_for_access_tokens.

Parameters

boolean
default:"true"
Set false to disable this policy.
object[]
default:"[]"
At most 25 rules. Each requires tool, when and action (require_approval or deny). Optional id: 1-64 characters from [A-Za-z0-9_.-]. See tools and conditions.
object
email (valid address, at most 320 characters) and/or phone (E.164). Required for any require_approval rule. Omitted contacts become null.
integer
default:"3600"
60-604800 seconds.
All conditions in a rule must match; deny wins. Each when needs at least one condition.

Response

200 returns the saved policy fields.
400 invalid_action_policy includes message and, for invalid rules, an errors array. 500 action_policy_write_failed means saving failed.

Held calls

A matching require_approval rule makes the protected call return 403 approval_required before it runs or is charged. This is a response from the protected endpoint, not this policy endpoint. Response excerpt:
approval is the full approval object. Poll it, then retry the same call with X-Approval-Id once approved. See held-call behavior.