1. Rules
Synci API
  • Overview
  • Guides
    • Authentication
    • Building OAuth apps
    • Webhooks
    • Pagination, filtering, and sorting
    • Errors
    • Rate limits
    • MCP: Connect AI assistants
  • API Reference
    • Finance
      • Connections
        • List all financial connections
        • Create a new financial connection
        • Get financial connection
        • Delete financial connection
        • Disable financial connection
        • Reconfirm the consent of a financial connection
      • Accounts
        • List all financial accounts
        • Get financial account
        • Update financial account
        • Delete financial account
        • Sync financial account data
        • Reset financial account config to defaults
        • List all account balance entries
        • Get account balance entry
        • List account holdings
        • Get account holding
      • Transactions
        • List all transactions
        • Create a new transaction
        • Get transaction
        • Update transaction
        • Delete transaction
        • Bulk delete transactions
      • Institutions
        • Get supported countries
        • List all supported institutions
        • Get supported institution
    • Destinations
      • YNAB Connections
        • YNAB Budgets
          • YNAB Budget Accounts
            • List all YNAB budget accounts
            • Get YNAB budget account
            • Delete YNAB budget account
          • List all YNAB budgets
          • Get YNAB budget
          • Delete YNAB budget
          • Update YNAB budget
        • List all YNAB connections
        • Create new YNAB connection
        • Get YNAB connection
        • Delete YNAB connection
        • Update YNAB connection
        • Refresh YNAB connection
      • Lunch Money Connections
        • Lunch Money Accounts
          • List all Lunch Money accounts
          • Get Lunch Money account
          • Delete Lunch Money account
        • List all Lunch Money connections
        • Create new Lunch Money connection
        • Get Lunch Money connection
        • Delete Lunch Money connection
        • Update Lunch Money connection
        • Refresh Lunch Money connection
      • Google Sheets Connections
        • Sheets
          • List destination spreadsheets for a connection
          • Register a destination spreadsheet
          • Get a destination spreadsheet
          • Update a destination spreadsheet
          • Delete a destination spreadsheet
          • List the worksheets (tabs) of a spreadsheet
          • Create a new worksheet (tab) in a spreadsheet
        • List all Google Sheets connections
        • Create new Google Sheets connection
        • Get Google Sheets connection
        • Delete Google Sheets connection
        • Update Google Sheets connection
        • Refresh Google Sheets connection
    • Transfer Links
      • List all transfer links
      • Create a new transfer link
      • Get transfer link
      • Update transfer link
      • Delete transfer link
      • Retry transfers for all transfer links
      • Retry transfers for a specific transfer link
    • Transfer Logs
      • List all transfer logs
      • Get transfer log
      • Undo a transfer
      • Undo multiple transfers
    • Rules
      • Create a new rule
        POST
      • List all rules
        GET
      • Get rule
        GET
      • Update rule
        PUT
      • Delete rule
        DELETE
      • Attach rule to transfer link
        POST
      • Detach rule from transfer link
        DELETE
      • Reorder rules for a transfer link
        PUT
      • Attach rule to a financial account
        POST
      • Detach rule from financial account
        DELETE
      • Reorder rules for a financial account
        PUT
      • Preview a rule against transactions (dry-run)
        POST
    • Rule Logs
      • List all rule logs
      • Get rule log
      • Undo multiple rule actions
      • Undo a rule action
    • Webhooks
      • List all webhook events
      • List all webhook endpoints
      • Create new webhook endpoint
      • Get webhook endpoint
      • Update webhook endpoint
      • Delete webhook endpoint
      • Test webhook endpoint
      • Rotate webhook secret
  • ActualBudgetConnections
    • List all Actual Budget connections
    • Create new Actual Budget connection
    • Get Actual Budget connection
    • Update Actual Budget connection
    • Delete Actual Budget connection
    • Regenerate setup token
    • Revoke access credentials
    • List accounts linked in Actual
  • Schemas
    • AccountHoldingResource
    • ActualBudgetAccountResource
    • ActualBudgetConnectionResource
    • BalanceTypeEnum
    • BulkDeleteTransactionsRequest
    • BulkUndoRuleLogsRequest
    • BulkUndoTransferLogsRequest
    • CreateFinancialConnectionRequest
    • CreateGoogleSheetTabRequest
    • CreateGoogleSheetsConnectionRequest
    • CreateLunchMoneyConnectionRequest
    • CreateRuleRequest
    • CreateTransactionRequest
    • CreateTransferLinkRequest
    • CreateWebhookEndpointRequest
    • CreateYnabConnectionRequest
    • DestinationTypeEnum
    • EnrichmentProviderEnum
    • FinancialAccount
    • FinancialAccountBalanceResource
    • FinancialAccountResource
    • FinancialConnectionResource
    • GoogleSheetResource
    • GoogleSheetsConnectionResource
    • HealthResource
    • HealthStatusEnum
    • InstitutionConfigMappedDateEnum
    • InstitutionConfigMappedTextEnum
    • InstitutionConfigResource
    • InstitutionResource
    • IntegratorEnum
    • LunchMoneyAccountResource
    • LunchMoneyConnectionResource
    • PreviewRuleRequest
    • ReauthorizeFinancialConnectionRequest
    • RetryTransfersAllLinksRequest
    • RetryTransfersRequest
    • RuleActionResource
    • RuleActionTypeEnum
    • RuleConditionResource
    • RuleLogResource
    • RuleOperatorEnum
    • RuleResource
    • RuleTypeEnum
    • StoreActualBudgetConnectionRequest
    • StoreGoogleSheetRequest
    • SyncFinancialAccountRequest
    • TestWebhookRequest
    • TransactionResource
    • TransactionTypeEnum
    • TransferLink
    • TransferLinkResource
    • TransferLinkSyncModeEnum
    • TransferLogResource
    • TransferLogStatusEnum
    • UpdateActualBudgetConnectionRequest
    • UpdateFinancialAccountRequest
    • UpdateGoogleSheetRequest
    • UpdateGoogleSheetsConnectionRequest
    • UpdateLunchMoneyConnectionRequest
    • UpdateRuleRequest
    • UpdateTransactionRequest
    • UpdateTransferLinkRequest
    • UpdateWebhookEndpointRequest
    • UpdateYnabBudgetRequest
    • UpdateYnabConnectionRequest
    • WebhookEndpointPayloadVersion
    • WebhookEndpointResource
    • WebhookEventResource
    • WebhookEventTypeEnum
    • WebhookTypeEnum
    • YnabBudgetAccountResource
    • YnabBudgetAccountTypeEnum
    • YnabBudgetResource
    • YnabConnectionResource
  1. Rules

Create a new rule

POST
/rules
Rules can be used to automatically handle or manipulate bank transactions, and are a powerful tool for improving your workflows and the quality of your data.

Rules can be attached to BankAccounts, TransferLinks, or destinations like YNAB Budget Accounts:
When a rule is attached to a bank account, it will be applied to all new transactions as they are fetched from the bank.
When a rule is attached to a transfer link, it will be applied to all transactions as they are transferred to their destination.
When a rule is attached to a YNAB budget account, Synci will automatically apply the rule to YNAB budget transactions. Any transaction changes will be synced back to YNAB.
Rules consist of Conditions and Actions:
Conditions are certain criteria that must be met for a rule to be applied. If no conditions are provided, the rule's actions will always be executed.
Actions are executed when a rule's conditions are met. Every rule must have at least one action. Every time an action is executed, a new RuleLog is created.
Rules can have up to 5 conditions and 5 actions, and each bank account or transfer link can have up to 10 rules attached, depending on your plan.
To see more information about plan limits, see the Synci Pricing page.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
OAuth 2.0
Authorization Code
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://api.synci.io/oauth/authorize
Token URL: https://api.synci.io/oauth/token
or
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Bodyapplication/json

🟠401AuthenticationException
🟠403AuthorizationException
🟠422ValidationException
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.synci.io/api/v1/rules' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "string",
    "description": "string",
    "enabled": true,
    "trigger_on_any_condition": true,
    "skip_other_rules_when_triggered": true,
    "type": "BANK",
    "institutions": [
        "string"
    ],
    "conditions": [
        {
            "field_name": "string",
            "operator": "EQUALS",
            "value": "string"
        }
    ],
    "actions": [
        {
            "order": 0,
            "action_type": "SET_YNAB_FIELD",
            "field_name": "string",
            "value": "string"
        }
    ],
    "financial_accounts": [
        {
            "id": 0,
            "order": 0
        }
    ],
    "transfer_links": [
        {
            "id": 0,
            "order": 0
        }
    ],
    "banks": [
        {
            "id": 0,
            "order": 0
        }
    ]
}'
Response Response Example
200 - Example 1
{
    "message": "Rule created.",
    "data": {
        "id": 0,
        "type": "BANK",
        "name": "string",
        "description": "string",
        "enabled": true,
        "migrated": true,
        "trigger_on_any_condition": true,
        "skip_other_rules_when_triggered": true,
        "conditions": [
            {
                "id": 0,
                "transaction_type": "BANK",
                "field_name": "currency",
                "operator": "EQUALS",
                "value": "NOK",
                "rules": [
                    {}
                ],
                "rules_count": "string",
                "created_at": "2019-08-24T14:15:22.123Z",
                "updated_at": "2019-08-24T14:15:22.123Z"
            }
        ],
        "conditions_count": "string",
        "actions": [
            {
                "id": 0,
                "order": 0,
                "action_type": "SET_YNAB_FIELD",
                "field_name": "memo",
                "value": "{{ transaction.remittance_information.unstructured | remove: \"REF \" }}",
                "rules": [
                    {}
                ],
                "rules_count": "string",
                "created_at": "2019-08-24T14:15:22.123Z",
                "updated_at": "2019-08-24T14:15:22.123Z"
            }
        ],
        "actions_count": "string",
        "financial_accounts": [
            {
                "rule_position": 0,
                "financial_account": {
                    "id": 0,
                    "financial_connection_id": 0,
                    "financial_connection": {
                        "id": 0,
                        "institution_id": 0,
                        "institution": {
                            "id": 0,
                            "integrator": "UNKNOWN",
                            "country": "string",
                            "name": "string",
                            "bic": "string",
                            "external_id": "string",
                            "logo": "string",
                            "supported": true,
                            "supports_pending_transactions": true,
                            "supports_card_accounts": true,
                            "max_historical_days": 0,
                            "max_access_valid_for_days": 0,
                            "category": "string",
                            "updated_at": "2019-08-24T14:15:22.123Z"
                        },
                        "enabled": true,
                        "health": {
                            "status": "HEALTHY",
                            "integrator_message": "string",
                            "failure_count": 0,
                            "last_attempt_at": "2019-08-24T14:15:22.123Z"
                        },
                        "status": "string",
                        "status_message": "string",
                        "sync_balances": true,
                        "supports_reauthorization": "string",
                        "supports_manage": "string",
                        "max_historical_days": "string",
                        "access_valid_for_days": "string",
                        "consent_expires_at": "string",
                        "accounts_last_synced_at": "2019-08-24T14:15:22.123Z",
                        "financial_accounts": [
                            {}
                        ],
                        "financial_accounts_count": "string",
                        "created_at": "2019-08-24T14:15:22.123Z",
                        "updated_at": "2019-08-24T14:15:22.123Z"
                    },
                    "config": {
                        "map_fields": {
                            "payee": "AUTO",
                            "description": "AUTO",
                            "date": "AUTO"
                        },
                        "enrichment": {
                            "enabled": "string",
                            "provider": "string",
                            "country": "string"
                        },
                        "sync_start_date": "2025-01-01",
                        "sync_auto": true,
                        "sync_pending_transactions": true,
                        "sync_balances": true,
                        "sync_frequency_in_minutes": 0,
                        "fields_for_duplicate_filtering": [
                            "string"
                        ]
                    },
                    "health": {
                        "status": "HEALTHY",
                        "integrator_message": "string",
                        "failure_count": 0,
                        "last_attempt_at": "2019-08-24T14:15:22.123Z"
                    },
                    "enabled": true,
                    "integrator": "UNKNOWN",
                    "account_category": "string",
                    "raw_type": "string",
                    "cash_balance": {
                        "amount": "string",
                        "currency": "string"
                    },
                    "meta": [
                        null
                    ],
                    "account_number_masked": "string",
                    "name": "string",
                    "custom_name": "string",
                    "display_name": "string",
                    "bban": "string",
                    "iban": "string",
                    "owner_name": "string",
                    "currency": "string",
                    "product_name": "string",
                    "details": "string",
                    "msisdn": "string",
                    "integrator_id": "string",
                    "institution_id": "string",
                    "details_last_synced_at": "2019-08-24T14:15:22.123Z",
                    "transactions_last_synced_at": "2019-08-24T14:15:22.123Z",
                    "balances_last_synced_at": "2019-08-24T14:15:22.123Z",
                    "balance": {
                        "available": null,
                        "cleared": null
                    },
                    "rules": "string",
                    "transfer_links": [
                        {
                            "id": 0,
                            "financial_account_id": 0,
                            "financial_account": {},
                            "destination_type": "YNAB",
                            "destination_id": 0,
                            "destination": {
                                "id": 0,
                                "budget_id": 0,
                                "budget": {
                                    "id": 0,
                                    "connection_id": 0,
                                    "connection": {
                                        "id": 0,
                                        "name": "string",
                                        "health": {
                                            "status": "HEALTHY",
                                            "integrator_message": "string",
                                            "failure_count": 0,
                                            "last_attempt_at": "2019-08-24T14:15:22.123Z"
                                        },
                                        "enabled": true,
                                        "auth_url": "string",
                                        "sync_balances": true,
                                        "ynab_user_id": "string",
                                        "budgets": [
                                            {}
                                        ],
                                        "last_synced_at": "2019-08-24T14:15:22.123Z",
                                        "created_at": "2019-08-24T14:15:22.123Z",
                                        "updated_at": "2019-08-24T14:15:22.123Z"
                                    },
                                    "ynab_id": "string",
                                    "enabled": true,
                                    "name": "string",
                                    "currency": "string",
                                    "first_month": "string",
                                    "last_month": "string",
                                    "accounts": [
                                        {}
                                    ],
                                    "last_synced_at": "2019-08-24T14:15:22.123Z",
                                    "created_at": "2019-08-24T14:15:22.123Z",
                                    "updated_at": "2019-08-24T14:15:22.123Z"
                                },
                                "ynab_id": "string",
                                "health": {
                                    "status": "HEALTHY",
                                    "integrator_message": "string",
                                    "failure_count": 0,
                                    "last_attempt_at": "2019-08-24T14:15:22.123Z"
                                },
                                "name": "string",
                                "type": "checking",
                                "on_budget": true,
                                "closed": true,
                                "note": "string",
                                "balance": "string",
                                "cleared_balance": "string",
                                "uncleared_balance": "string",
                                "transfer_payee_id": "string",
                                "direct_import_linked": true,
                                "last_reconciled_at": "string",
                                "rules": "string",
                                "transfer_links": [
                                    {}
                                ],
                                "created_at": "2019-08-24T14:15:22.123Z",
                                "updated_at": "2019-08-24T14:15:22.123Z"
                            },
                            "transfer_start_date": "2025-01-01",
                            "active": true,
                            "sync_mode": "TRANSACTIONS",
                            "on_booked_change": {
                                "update_status": true,
                                "update_payee": true,
                                "update_description": true,
                                "update_amount": true
                            },
                            "rules": "string",
                            "created_at": "2019-08-24T14:15:22.123Z",
                            "updated_at": "2019-08-24T14:15:22.123Z"
                        }
                    ],
                    "transfer_links_count": "string",
                    "created_at": "2019-08-24T14:15:22.123Z",
                    "updated_at": "2019-08-24T14:15:22.123Z"
                }
            }
        ],
        "financial_accounts_count": "string",
        "transfer_links": [
            {
                "rule_position": 0,
                "transfer_link": {
                    "id": 0,
                    "financial_account_id": 0,
                    "financial_account": {
                        "id": 0,
                        "financial_connection_id": 0,
                        "financial_connection": {
                            "id": 0,
                            "institution_id": 0,
                            "institution": {
                                "id": 0,
                                "integrator": "UNKNOWN",
                                "country": "string",
                                "name": "string",
                                "bic": "string",
                                "external_id": "string",
                                "logo": "string",
                                "supported": true,
                                "supports_pending_transactions": true,
                                "supports_card_accounts": true,
                                "max_historical_days": 0,
                                "max_access_valid_for_days": 0,
                                "category": "string",
                                "updated_at": "2019-08-24T14:15:22.123Z"
                            },
                            "enabled": true,
                            "health": {
                                "status": "HEALTHY",
                                "integrator_message": "string",
                                "failure_count": 0,
                                "last_attempt_at": "2019-08-24T14:15:22.123Z"
                            },
                            "status": "string",
                            "status_message": "string",
                            "sync_balances": true,
                            "supports_reauthorization": "string",
                            "supports_manage": "string",
                            "max_historical_days": "string",
                            "access_valid_for_days": "string",
                            "consent_expires_at": "string",
                            "accounts_last_synced_at": "2019-08-24T14:15:22.123Z",
                            "financial_accounts": [
                                {}
                            ],
                            "financial_accounts_count": "string",
                            "created_at": "2019-08-24T14:15:22.123Z",
                            "updated_at": "2019-08-24T14:15:22.123Z"
                        },
                        "config": {
                            "map_fields": {
                                "payee": "AUTO",
                                "description": "AUTO",
                                "date": "AUTO"
                            },
                            "enrichment": {
                                "enabled": "string",
                                "provider": "string",
                                "country": "string"
                            },
                            "sync_start_date": "2025-01-01",
                            "sync_auto": true,
                            "sync_pending_transactions": true,
                            "sync_balances": true,
                            "sync_frequency_in_minutes": 0,
                            "fields_for_duplicate_filtering": [
                                "string"
                            ]
                        },
                        "health": {
                            "status": "HEALTHY",
                            "integrator_message": "string",
                            "failure_count": 0,
                            "last_attempt_at": "2019-08-24T14:15:22.123Z"
                        },
                        "enabled": true,
                        "integrator": "UNKNOWN",
                        "account_category": "string",
                        "raw_type": "string",
                        "cash_balance": {
                            "amount": "string",
                            "currency": "string"
                        },
                        "meta": [
                            null
                        ],
                        "account_number_masked": "string",
                        "name": "string",
                        "custom_name": "string",
                        "display_name": "string",
                        "bban": "string",
                        "iban": "string",
                        "owner_name": "string",
                        "currency": "string",
                        "product_name": "string",
                        "details": "string",
                        "msisdn": "string",
                        "integrator_id": "string",
                        "institution_id": "string",
                        "details_last_synced_at": "2019-08-24T14:15:22.123Z",
                        "transactions_last_synced_at": "2019-08-24T14:15:22.123Z",
                        "balances_last_synced_at": "2019-08-24T14:15:22.123Z",
                        "balance": {
                            "available": null,
                            "cleared": null
                        },
                        "rules": "string",
                        "transfer_links": [
                            {}
                        ],
                        "transfer_links_count": "string",
                        "created_at": "2019-08-24T14:15:22.123Z",
                        "updated_at": "2019-08-24T14:15:22.123Z"
                    },
                    "destination_type": "YNAB",
                    "destination_id": 0,
                    "destination": {
                        "id": 0,
                        "budget_id": 0,
                        "budget": {
                            "id": 0,
                            "connection_id": 0,
                            "connection": {
                                "id": 0,
                                "name": "string",
                                "health": {
                                    "status": "HEALTHY",
                                    "integrator_message": "string",
                                    "failure_count": 0,
                                    "last_attempt_at": "2019-08-24T14:15:22.123Z"
                                },
                                "enabled": true,
                                "auth_url": "string",
                                "sync_balances": true,
                                "ynab_user_id": "string",
                                "budgets": [
                                    {}
                                ],
                                "last_synced_at": "2019-08-24T14:15:22.123Z",
                                "created_at": "2019-08-24T14:15:22.123Z",
                                "updated_at": "2019-08-24T14:15:22.123Z"
                            },
                            "ynab_id": "string",
                            "enabled": true,
                            "name": "string",
                            "currency": "string",
                            "first_month": "string",
                            "last_month": "string",
                            "accounts": [
                                {}
                            ],
                            "last_synced_at": "2019-08-24T14:15:22.123Z",
                            "created_at": "2019-08-24T14:15:22.123Z",
                            "updated_at": "2019-08-24T14:15:22.123Z"
                        },
                        "ynab_id": "string",
                        "health": {
                            "status": "HEALTHY",
                            "integrator_message": "string",
                            "failure_count": 0,
                            "last_attempt_at": "2019-08-24T14:15:22.123Z"
                        },
                        "name": "string",
                        "type": "checking",
                        "on_budget": true,
                        "closed": true,
                        "note": "string",
                        "balance": "string",
                        "cleared_balance": "string",
                        "uncleared_balance": "string",
                        "transfer_payee_id": "string",
                        "direct_import_linked": true,
                        "last_reconciled_at": "string",
                        "rules": "string",
                        "transfer_links": [
                            {}
                        ],
                        "created_at": "2019-08-24T14:15:22.123Z",
                        "updated_at": "2019-08-24T14:15:22.123Z"
                    },
                    "transfer_start_date": "2025-01-01",
                    "active": true,
                    "sync_mode": "TRANSACTIONS",
                    "on_booked_change": {
                        "update_status": true,
                        "update_payee": true,
                        "update_description": true,
                        "update_amount": true
                    },
                    "rules": "string",
                    "created_at": "2019-08-24T14:15:22.123Z",
                    "updated_at": "2019-08-24T14:15:22.123Z"
                }
            }
        ],
        "transfer_links_count": "string",
        "created_at": "2019-08-24T14:15:22.123Z",
        "updated_at": "2019-08-24T14:15:22.123Z"
    }
}
Modified at 2026-07-14 16:18:50
Previous
Undo multiple transfers
Next
List all rules
Built with