update_transaction_automation
Update a transaction automation rule. Only provided fields change; conditions and actions are replaced wholesale, not merged. Setting isEnabled to true or changing conditions/actions re-validates every referenced category, tag, payee, and account and clears pausedReason, so this is how a rule paused by a deleted reference is repaired. Position is not changed here, use reorder_transaction_automations. Requires finance:write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | UUID of the automation | |
| name | No | New display name | |
| actions | No | Actions applied when the conditions match. 1-4 actions, each type at most once. - { "type": "set_category", "categoryId": "<uuid>" } - { "type": "add_tags", "tagIds": ["<uuid>"] } with 1-20 tag ids - { "type": "set_payee", "payeeId": "<uuid>" } - { "type": "set_note", "mode": "replace" | "append" | "prepend", "value": "<text, max 200 chars>" } Every referenced category, tag, and payee must belong to the user, otherwise the call is rejected. | |
| isEnabled | No | Enable or disable the rule | |
| conditions | No | Condition tree: { match: "all" | "any", items: [...] }. 1-10 items, at most one transactionType item. Item shapes by field: - note | merchant (merchant is the bank-provided merchant/description text): { field, operator, value }. operator: contains_any | not_contains_any | starts_with_any | ends_with_any | equals_any | is_empty. value: 1-20 case-insensitive keywords, max 64 chars each; required unless operator is is_empty. Example: { "field": "merchant", "operator": "contains_any", "value": ["uber", "bolt"] } - payee | account | accountGroup | bankConnection: { field, operator, value }. operator: in | not_in. value: 1-20 UUIDs of that entity, all owned by the user. Example: { "field": "account", "operator": "in", "value": ["<accountId>"] } - amount: { field, operator, value: { min?, max? }, currency }. operator: gte | lte | between | equals. gte and equals take min only, lte takes max only, between takes both. Bounds are decimals (e.g. 12.50). currency: { "mode": "transaction" } compares in the currency of the transaction itself, { "mode": "base" } in the user base currency, { "mode": "specific", "code": "USD" } in a fixed currency. Example: { "field": "amount", "operator": "gte", "value": { "min": 100 }, "currency": { "mode": "base" } } - transactionType: { "field": "transactionType", "operator": "equals", "value": "income" | "expense" } - dayOfMonth: { "field": "dayOfMonth", "operator": "between", "value": { "min": 1, "max": 31 } } |