Transaction rules
A transaction rule changes new transactions that match its conditions, for
example setting the payee and category of every transaction whose description
contains "COFFEE". Rules run in priority order. For how rules work in the
product, see Transaction rules in the help
center.
| Operation | Method and path | Scope |
|---|---|---|
get-transaction-rule-schema | GET /v1/workspaces/{workspaceID}/transaction-rules/schema | transaction-rules:read |
list-transaction-rules | GET /v1/workspaces/{workspaceID}/transaction-rules | transaction-rules:read |
get-transaction-rule | GET /v1/workspaces/{workspaceID}/transaction-rules/{ruleID} | transaction-rules:read |
create-transaction-rule | POST /v1/workspaces/{workspaceID}/transaction-rules | transaction-rules:write |
update-transaction-rule | PATCH /v1/workspaces/{workspaceID}/transaction-rules/{ruleID} | transaction-rules:write |
delete-transaction-rule | DELETE /v1/workspaces/{workspaceID}/transaction-rules/{ruleID} | transaction-rules:write |
reorder-transaction-rules | POST /v1/workspaces/{workspaceID}/transaction-rules/reorder | transaction-rules:write |
list-transaction-rule-applications | GET /v1/workspaces/{workspaceID}/transaction-rules/{ruleID}/applications | transaction-rules:read |
list-transaction-rule-applications-for-transaction | GET /v1/workspaces/{workspaceID}/transactions/{transactionID}/rule-applications | transaction-rules:read |
preview-transaction-rule | POST /v1/workspaces/{workspaceID}/transaction-rules/preview | transaction-rules:read |
preview-transaction-rule-on-existing-transactions | POST /v1/workspaces/{workspaceID}/transaction-rules/preview-existing | transaction-rules:read |
evaluate-transaction-rules | POST /v1/workspaces/{workspaceID}/transaction-rules/evaluate | transaction-rules:read |
evaluate-rules-for-transaction | POST /v1/workspaces/{workspaceID}/transactions/{transactionID}/evaluate-rules | transaction-rules:read |
create-transaction-rule-draft-from-transaction | POST /v1/workspaces/{workspaceID}/transactions/{transactionID}/transaction-rule-draft | transaction-rules:read |
apply-transaction-rule-to-existing-transactions | POST /v1/workspaces/{workspaceID}/transaction-rules/apply-existing | transaction-rules:write and transactions:write |
get-transaction-rule-run | GET /v1/workspaces/{workspaceID}/transaction-rules/runs/{runID} | transaction-rules:read |
undo-transaction-rule-run | POST /v1/workspaces/{workspaceID}/transaction-rules/runs/{runID}/undo | transaction-rules:write and transactions:write |
Previews, evaluations and drafts are POST requests but change nothing, so
they need only the read scope. The conditions and actions a rule can use, and
whether each needs an Advanced plan, come from get-transaction-rule-schema.
Request and response fields for every operation are in the
OpenAPI document.
create-transaction-rule accepts an optional Idempotency-Key header, so a
client that timed out can resend the request without creating a second rule.
The same key and body returns the original rule with 201; the same key with a
different body is 409 IDEMPOTENCY_KEY_CONFLICT. See
Idempotency.
The rule object
get-transaction-rule returns one rule. Its conditions and actions are
left out of this example:
{
"id": "trule_6Pz3Kd9Lw2Xb7Rt4Hn1Mq",
"name": "Coffee shops",
"description": "",
"enabled": true,
"priority": 3,
"stopProcessing": false,
"matchCount": 14,
"lastMatchedAt": "2026-11-03T08:12:40Z",
"requiredCapability": "basic",
"availableOnCurrentPlan": true,
"effectiveEnabled": true,
"createdAt": "2026-08-21T10:02:11Z",
"updatedAt": "2026-10-30T16:45:09Z"
}
enabledis the rule's own switch.effectiveEnabledis whether it actually runs: it isfalsewhen the rule is off, or when it uses an Advanced feature (requiredCapability: "advanced") that the current plan doesn't include (availableOnCurrentPlan: false).matchCountis how many times the rule has changed a transaction: as transactions arrived from a file import or bank sync, and when the rule was applied to existing transactions. It is0for a rule that never matched.- Previews, evaluations and the defaults rules suggest while someone enters a transaction by hand never count.
- Undoing an apply-to-existing run doesn't lower it: it reports what the rule did, not what is left of it.
- Deleting a transaction removes that transaction's matches from the count.
lastMatchedAtis when the rule last changed a transaction that still exists, ornullif it never has.
The help center shows the same figures as Matched 14 times, last 3 Nov; see Edit, disable or delete a rule.
List rules
GET /v1/workspaces/{workspaceID}/transaction-rules
| Parameter | Description |
|---|---|
q | Only rules whose name contains this text, ignoring case. |
enabled | true or false: only rules that are on, or off. |
page | Page number. Default 1. |
pageSize | Rules per page. Default 50, up to 200. |
The response has rules, total, page and pageSize. Rules are in the
order they run (priority). Each item has the same fields as the rule object,
including matchCount and lastMatchedAt, except that conditions and
actions are replaced by conditionCount and actionCount. Read one rule for
its full definition.
Apply a rule to existing transactions
Rules run on new transactions as they arrive. To run one over transactions you already
have, preview with preview-transaction-rule-on-existing-transactions, then
send the same body to apply-transaction-rule-to-existing-transactions. Each
call changes at most 500 transactions. It answers 202 with the run object
while the run continues in the background: poll get-transaction-rule-run
with its id until status is completed or failed, and reverse it once
with undo-transaction-rule-run, which also answers 202. To run every
enabled rule at once, use preview-all-transaction-rules-on-existing-transactions
and apply-all-transaction-rules-to-existing-transactions. See
Transaction Rule Runs. The MCP tool
apply_transaction_rule_to_existing_transactions
describes the run, its limits and what it changes in detail.
MCP
AI assistants read rules with
list_transaction_rules and
get_transaction_rule, in the
same shape.