Skip to main content

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.

OperationMethod and pathScope
get-transaction-rule-schemaGET /v1/workspaces/{workspaceID}/transaction-rules/schematransaction-rules:read
list-transaction-rulesGET /v1/workspaces/{workspaceID}/transaction-rulestransaction-rules:read
get-transaction-ruleGET /v1/workspaces/{workspaceID}/transaction-rules/{ruleID}transaction-rules:read
create-transaction-rulePOST /v1/workspaces/{workspaceID}/transaction-rulestransaction-rules:write
update-transaction-rulePATCH /v1/workspaces/{workspaceID}/transaction-rules/{ruleID}transaction-rules:write
delete-transaction-ruleDELETE /v1/workspaces/{workspaceID}/transaction-rules/{ruleID}transaction-rules:write
reorder-transaction-rulesPOST /v1/workspaces/{workspaceID}/transaction-rules/reordertransaction-rules:write
list-transaction-rule-applicationsGET /v1/workspaces/{workspaceID}/transaction-rules/{ruleID}/applicationstransaction-rules:read
list-transaction-rule-applications-for-transactionGET /v1/workspaces/{workspaceID}/transactions/{transactionID}/rule-applicationstransaction-rules:read
preview-transaction-rulePOST /v1/workspaces/{workspaceID}/transaction-rules/previewtransaction-rules:read
preview-transaction-rule-on-existing-transactionsPOST /v1/workspaces/{workspaceID}/transaction-rules/preview-existingtransaction-rules:read
evaluate-transaction-rulesPOST /v1/workspaces/{workspaceID}/transaction-rules/evaluatetransaction-rules:read
evaluate-rules-for-transactionPOST /v1/workspaces/{workspaceID}/transactions/{transactionID}/evaluate-rulestransaction-rules:read
create-transaction-rule-draft-from-transactionPOST /v1/workspaces/{workspaceID}/transactions/{transactionID}/transaction-rule-drafttransaction-rules:read
apply-transaction-rule-to-existing-transactionsPOST /v1/workspaces/{workspaceID}/transaction-rules/apply-existingtransaction-rules:write and transactions:write
get-transaction-rule-runGET /v1/workspaces/{workspaceID}/transaction-rules/runs/{runID}transaction-rules:read
undo-transaction-rule-runPOST /v1/workspaces/{workspaceID}/transaction-rules/runs/{runID}/undotransaction-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"
}
  • enabled is the rule's own switch. effectiveEnabled is whether it actually runs: it is false when the rule is off, or when it uses an Advanced feature (requiredCapability: "advanced") that the current plan doesn't include (availableOnCurrentPlan: false).
  • matchCount is 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 is 0 for 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.
  • lastMatchedAt is when the rule last changed a transaction that still exists, or null if 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
ParameterDescription
qOnly rules whose name contains this text, ignoring case.
enabledtrue or false: only rules that are on, or off.
pagePage number. Default 1.
pageSizeRules 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.