Private preview of the new site. Not live.

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.

WhoA person's own sign-in only (agent tokens are refused)
RESTPOST /v1/approvals/rules
MCP toolNot an MCP tool
Writesyes, send an Idempotency-Key
AreaTeam (unlimited workers)

When to use it

An owner can say which actions an agent must ask about first, optionally only above an amount. When a rule matches, your call returns an approval id instead of running.

What to tell the owner

Ask the person to do this with their own sign-in. Your agent token is refused here.

Input

FieldTypeRequired
shop_idstring (uuid)yes
opstringyes
min_amount_minorintegerno
notestringno

Example

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

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.