Create rule
Saves a company automation rule and returns its complete definition. Requires API access: Manage and Accounting setup: Manage. Historical application additionally requires Transactions: Manage, rechecked at execution. apply_to_existing_transactions is a strict boolean defaulting to true; false saves a future-only rule. A 201 confirms saving, not completion of historical application. Requested work is saved durably and recovered after enqueue failures. No public job, polling endpoint, or Idempotency-Key is required. The application flag is never returned as saved state. Historical eligibility is approved uncategorized transactions; department actions additionally consider missing-department transactions and never replace assigned departments. Existing priority, automation limits and rollback behavior apply. Accounting-date offsets apply only on import; mixed rules can apply other actions historically. No bulk transaction cap or split exclusion applies. A pending run is cancelled by a successful edit or delete before it starts. Running work is serialized against edits/deletes; callers can retry a busy mutation. Failed historical application does not delete the saved rule. There is no feature flag. Exact duplicates in the same company return 409 rule_already_exists with the accessible existing rule ID in the message, without another run. Condition and action order and case-insensitive text condition casing do not distinguish definitions; the application flag does not distinguish them. After an uncertain response, an identical retry may return that conflict: retrieve the existing rule instead of requesting another run. Different actions are not exact duplicates. Unknown keys, legacy write fields, null actions, wrong types, reversed ranges and unsupported combinations return 400. Unavailable references return 404 without revealing foreign resources.
Authorizations
API key prefixed with finta_
Body
Nonempty flat AND list. Repeated fields are allowed; all constraints must match.
1merchant matches the assigned merchant name; description matches the transaction description. account_id and card_id must be accessible exact stable identities. Legacy account and card_name text conditions are read-only compatibility fields and are rejected on create. Combined account/card references require a provable relationship; incompatible or unverifiable pairs are rejected. transaction_type currently represents transfer only; it is not the public transaction resource's standard/transfer/split enum. Signed amount_cents uses integer cents without absolute values or currency conversion. greater_than means >=, less_than means <=, and between includes both bounds, minimum first. Signed amounts express inflow/outflow constraints; there is no separate direction field. Consumers must handle legacy text fields and should tolerate future supported condition variants.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Nonempty supported subset. Explicit nulls are rejected. Categories must be selectable and departments assignable; nonzero offsets cannot accompany Asset categories.
Create-only switch requesting asynchronous historical application. False saves for future matching only. A saved response does not confirm execution completed.
Response
Saved rule; historical application may still be queued.
The complete saved company automation definition. IDs are stable opaque rule_ identifiers, including for historical rules. No public condition IDs, priority, enable state, or historical application status are exposed. The create-time application flag is not response state.
^rule_[A-Za-z0-9]+$rule Flat AND conditions; repeated fields express multiple constraints. Text matches are case-insensitive.
1merchant matches the assigned merchant name; description matches the transaction description. account_id and card_id match exact stable identities, never display names. Legacy account and card_name are compatibility text fields; duplicate names and contains can match multiple sources. Their original stored text is preserved. transaction_type currently represents transfer only; it is not the public transaction resource's standard/transfer/split enum. Signed amount_cents uses integer cents without absolute values or currency conversion. greater_than means >=, less_than means <=, and between includes both bounds, minimum first. Signed amounts express inflow/outflow constraints; there is no separate direction field. Consumers must handle legacy text fields and should tolerate future supported condition variants.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Only configured actions are present; absent actions are omitted rather than null. category_id and department_id preserve the saved reference's public ID, including legacy references that may no longer be selectable for a new rule. Reading a rule performs no actions. Accounting-date offsets are relative to the original transaction date on import, and do not apply historically. Nonzero offsets cannot be combined with Asset category actions.