--- title: approvals.setRule | Doing Work API description: Owner only, not an agent: require owner approval before an agent can run an action. op is an operation id (invoices.send), an area (invoices.*) or * for. url: https://doingwork.work/docs/reference/approvals-setrule/ --- # approvals.setRule Owner only, not an agent: require owner approval before an agent can run an action. op is an operation id (invoices.send), an area (invoices.*) or * for every write. min_amount_minor limits the rule to actions moving or billing at least that much. | | | |---|---| | Who | A person's own sign-in only (agent tokens are refused) | | REST | `POST /v1/approvals/rules` | | MCP tool | Not an MCP tool | | Writes | yes, send an Idempotency-Key | | Area | [Team (unlimited workers)](https://doingwork.work/docs/reference/#team-unlimited-workers) | ## When to use it Owner only, not an agent: require owner approval before an agent can run an action. op is an operation id (invoices.send), an area (invoices.*) or * for every write. ## What to tell the owner Ask the person to do this with their own sign-in. Your agent token is refused here. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `op` | string | yes | | `min_amount_minor` | integer | no | | `note` | string | no | ## Example ```http POST https://doingwork.work/v1/approvals/rules content-type: application/json Idempotency-Key: 3f1c... { "shop_id": "00000000-0000-4000-8000-000000000000", "op": "..." } ``` ## Output JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`. ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |