Update Transaction Rule
update_transaction_ruleEdit a Monarch Money transaction rule by ID, preserving unchanged settings, and optionally apply it to past transactions.
Instructions
Edit a rule, and optionally run it on existing transactions.
Get rule_id from get_transaction_rules. Arguments you leave out keep their current value. To clear a value, pass [] for a list or "" for set_category_id, set_merchant_name, or review_status. clear_amount_criteria removes the amount criterion. A list replaces the whole old list. Shapes match create_transaction_rule.
Monarch replaces the whole rule on update. So this reads the rule first and sends it back with your changes, which keeps settings this tool can't edit, such as owners, goals, and splits. The edited rule must keep at least one action and a merchant, statement, or amount criterion.
apply_to_existing_transactions=True runs the rule on matching past transactions, even with no other changes. That is hard to undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_id | Yes | ||
| account_ids | No | ||
| add_tag_ids | No | ||
| category_ids | No | ||
| review_status | No | ||
| amount_criteria | No | ||
| set_category_id | No | ||
| hide_from_reports | No | ||
| merchant_criteria | No | ||
| set_merchant_name | No | ||
| clear_amount_criteria | No | ||
| original_statement_criteria | No | ||
| apply_to_existing_transactions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | ||
| applied_to_existing_transactions | Yes |