Skip to main content
POST
Create a new rule

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string
required

The name of the rule.

Maximum string length: 64
description
string | null

An optional description of what the rule does.

Maximum string length: 192
enabled
boolean

Whether the rule is active. Disabled rules are not applied.

trigger_on_any_condition
boolean

When enabled, only one condition must match for the rule to be applied.

skip_other_rules_when_triggered
boolean

If the rule's conditions are met, stop processing other rules attached to the same financial account or transfer link.

scope
enum<string>

Where the rule runs:

  • BANK: applied to transactions as they are stored in Synci (changes are permanent). Can only be attached to financial accounts.
  • TRANSFER: applied while transactions are transferred to a destination (changes land only in the destination copy). Can only be attached to transfer links; which destinations the rule fits is derived from its actions.
Available options:
BANK,
TRANSFER
type
enum<string>

The legacy rule type (BANK, YNAB_TRANSFER_LINK, LUNCH_MONEY_TRANSFER_LINK, **GOOGLE_SHEETS_TRANSFER_LINK**). Deprecated: send scope` instead. When both are provided they must agree.

Available options:
BANK,
YNAB_TRANSFER_LINK,
LUNCH_MONEY_TRANSFER_LINK,
GOOGLE_SHEETS_TRANSFER_LINK,
NOTION_TRANSFER_LINK
conditions
object[]

The conditions that must be met for the rule to be applied. If no conditions are provided, the rule's actions will always be executed.

actions
object[]

The actions to execute when the rule's conditions are met. Every rule must have at least one action.

financial_accounts
object[]

The financial accounts to attach the rule to, each with an id and an order. Only allowed for BANK rules.

The transfer links to attach the rule to, each with an id and an order. Only allowed for transfer link rule types.

institutions
string[]

Reserved for Synci administrators.

banks
object[]

Response

message
string
required
Allowed value: "Rule created."
data
RuleResource · object
required