{
    "openapi": "3.1.2",
    "info": {
        "title": "Synci",
        "version": "1.0",
        "description": "Synci is a platform for integrating financial accounts with your favorite apps."
    },
    "servers": [
        {
            "url": "https://api.synci.io/api/v1"
        }
    ],
    "tags": [
        {
            "name": "Connections"
        },
        {
            "name": "Accounts"
        },
        {
            "name": "Transactions"
        },
        {
            "name": "Loans"
        },
        {
            "name": "Manual accounts"
        },
        {
            "name": "Imports"
        },
        {
            "name": "Institutions"
        },
        {
            "name": "YNAB"
        },
        {
            "name": "Lunch Money"
        },
        {
            "name": "Google Sheets"
        },
        {
            "name": "SimpleFIN"
        },
        {
            "name": "Notion"
        },
        {
            "name": "Webhooks"
        },
        {
            "name": "User"
        },
        {
            "name": "Rules"
        },
        {
            "name": "Rule Logs"
        },
        {
            "name": "Transfer Links"
        },
        {
            "name": "Transfer Logs"
        }
    ],
    "x-tagGroups": [
        {
            "name": "Finance",
            "tags": [
                "Connections",
                "Accounts",
                "Transactions",
                "Loans",
                "Manual accounts",
                "Imports",
                "Institutions"
            ]
        },
        {
            "name": "Destinations",
            "tags": [
                "YNAB",
                "Lunch Money",
                "Google Sheets",
                "SimpleFIN",
                "Notion"
            ]
        },
        {
            "name": "Account",
            "tags": [
                "Webhooks",
                "User"
            ]
        },
        {
            "name": "Rules",
            "tags": [
                "Rules",
                "Rule Logs"
            ]
        },
        {
            "name": "Transfers",
            "tags": [
                "Transfer Links",
                "Transfer Logs"
            ]
        }
    ],
    "security": [
        {
            "oauth2": []
        },
        {
            "http": []
        }
    ],
    "paths": {
        "/finance/connections": {
            "get": {
                "operationId": "financial.connections.index",
                "description": "Returns a paginated list of the authenticated user's financial connections.",
                "summary": "List all financial connections",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "omit_sensitive_identifiers",
                        "in": "query",
                        "description": "If you include `financial_accounts` in your request, Synci will omit sensitive financial account/card number identifiers, and certain direct identifiers from the response.\nCurrently, the following fields will be omitted: `iban`, `bban`, `scan`, `owner_name`, `owner_address`, `bic`, `msisdn`, `account_number_masked`, `integrator_id`, `institution_id`.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[institution_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[agreement_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[requisition_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[reference]",
                        "in": "query",
                        "description": "Filter by the caller-supplied correlation id set at creation\n(e.g. a platform developer's own end-user id):\n?filter[reference]=my-user-123",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Free-text search over the institution name and the reference\n(partial, case-insensitive) \u2014 same semantics as\nfilter[search] on /finance/transactions.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[integrator]",
                        "in": "query",
                        "description": "Filter by the connection's provider directly. Accepts a\nsingle value or comma-separated list:\n?filter[integrator]=GOCARDLESS\n?filter[integrator]=GOCARDLESS,AKAHU",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[category]",
                        "in": "query",
                        "description": "Filter by the institution's category. SnapTrade institutions\nare categorized as BROKERAGE or CRYPTO; bank institutions\nhave no category.\n?filter[category]=BROKERAGE\n?filter[category]=CRYPTO",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[domain]",
                        "in": "query",
                        "description": "Filter by data domain: `bank` returns bank connections (including\ndemo banks), `asset` returns brokerage and crypto exchange\nconnections.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "financial_accounts",
                                    "financial_accounts.transfer_links",
                                    "financial_accounts.rules",
                                    "institution",
                                    "financial_accounts_count"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `FinancialConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FinancialConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "financial.connections.store",
                "description": "Creates the connection and returns an authorization URL (`auth_url`). Send the user there to authorize\nwith the bank. Once authorized, Synci discovers the connection's accounts and starts their first balance and\ntransaction sync, reaching back `max_historical_days` (any value up to the institution's maximum).\n\nTwo kinds of connection cannot start here. US banks (Array) authorize through an embedded SDK rather than a\nURL: the endpoint answers `403` with `code: \"provider_requires_synci_surface\"`, and the connection is made in\nthe Synci Dashboard or the connection portal. Managed users connect in the portal too: with a managed user's\ntoken the endpoint answers `403` with `code: \"managed_connection_requires_portal\"`, and you mint a portal\nsession instead (`POST /managed/v1/users/{id}/portal-sessions`).\n\nAccounts discovered on a platform app's connection are created with `sync_auto` off and nothing is fetched\nuntil you configure them. Send the account config (`sync_start_date` plus `sync_auto: true`) or call\n`POST /finance/accounts/{id}/sync` to start. `sync_start_date` is the oldest date the backfill reaches;\nhistory before it is never fetched.",
                "summary": "Create a new financial connection",
                "tags": [
                    "Connections"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateFinancialConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Financial connection created. Follow the URL to start the authentication process with the bank."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "auth_url": {
                                                    "type": "string"
                                                },
                                                "client_session": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "Non-null instead of auth_url for providers whose consent\nflow runs as an embedded client-side SDK, which need a\nsession token rather than a URL. Exactly one of the two\nis ever set.",
                                                    "additionalProperties": {}
                                                },
                                                "financial_connection": {
                                                    "$ref": "#/components/schemas/FinancialConnectionResource"
                                                }
                                            },
                                            "required": [
                                                "auth_url",
                                                "client_session",
                                                "financial_connection"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "A connection for this institution already exists."
                                                },
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "already_connected": {
                                                            "type": "boolean"
                                                        },
                                                        "financial_connection": {
                                                            "$ref": "#/components/schemas/FinancialConnectionResource"
                                                        }
                                                    },
                                                    "required": [
                                                        "already_connected",
                                                        "financial_connection"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "description": "Error overview."
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "This institution has no provider on record and cannot be connected."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "The region that hosts this provider is temporarily unavailable. Please try again."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "cell_unavailable"
                                        },
                                        "region": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code",
                                        "region"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Provider is not hosted in this region."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "cell_misrouted"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Institution not found."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/connections/{connectionId}": {
            "get": {
                "operationId": "financial.connections.show",
                "summary": "Get financial connection",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`FinancialConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/FinancialConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "institution",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "financial.connections.destroy",
                "description": "Deleting a financial connection will also delete all associated data, like financial accounts, balances, transactions, and transfer links.",
                "summary": "Delete financial connection",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/connections/{connectionId}/disable": {
            "put": {
                "operationId": "financial.connections.disable",
                "description": "Disables the connection so its accounts stop syncing. Use the reauthorize endpoint to re-enable it.",
                "summary": "Disable financial connection",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Financial connection disabled."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/FinancialConnectionResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "The manual accounts connection cannot be disabled."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/connections/{connectionId}/reauthorize": {
            "put": {
                "operationId": "financial.connections.reauthorize",
                "description": "Starts a fresh authorization with the bank for an existing connection and returns an authorization URL\n(`auth_url`). Send the user there; once they have authorized, the connection keeps its id, accounts and\nhistory, and syncing resumes. Any accounts the bank newly reports are discovered as on creation.\n\nManaged users renew in the connection portal instead: with a managed user's token the endpoint answers `403`\nwith `code: \"managed_connection_requires_portal\"`. Mint a portal session with `connection_id`\n(`POST /managed/v1/users/{userId}/portal-sessions`); a `connection.reauthorized` webhook follows the renewal.",
                "summary": "Reconfirm the consent of a financial connection",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReauthorizeFinancialConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Reauthorization initialized. Follow the URL to start the authentication process with the bank."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "auth_url": {
                                                    "type": "string"
                                                },
                                                "client_session": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "See store(): set instead of auth_url for embedded-SDK providers.",
                                                    "additionalProperties": {}
                                                },
                                                "financial_connection": {
                                                    "$ref": "#/components/schemas/FinancialConnectionResource"
                                                }
                                            },
                                            "required": [
                                                "auth_url",
                                                "client_session",
                                                "financial_connection"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "REAUTHORIZATION_NOT_SUPPORTED"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "This connection does not support reauthorization \u2014 it stays active until you disable or delete it."
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "REAUTHORIZATION_NOT_SUPPORTED"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "This connection has no institution on record, so it cannot be reauthorized."
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "null"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Provider is not hosted in this region."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "cell_misrouted"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/connections/{connectionId}/setup/accounts": {
            "put": {
                "operationId": "financial.connections.setup.accounts",
                "description": "Keeps the given accounts enabled and disables every other account the provider found. Only possible\nonce account discovery has finished (`accounts_last_synced_at` is set). While setup is pending, the\nfirst sync waits for `POST /setup/complete`. After setup is complete, the selection can be revisited\nand newly enabled accounts start syncing immediately if their settings allow automatic sync.",
                "summary": "Choose the accounts to keep",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SelectConnectionSetupAccountsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Accounts selected."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/FinancialConnectionResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "The accounts on this connection are still being discovered. Try again in a moment."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "accounts_not_discovered"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/connections/{connectionId}/setup/complete": {
            "post": {
                "operationId": "financial.connections.setup.complete",
                "description": "Marks the connection's setup as finished and starts the first transaction sync of every account\nthat remains, using whatever account settings have been saved by then. Safe to call again: a\nconnection whose setup is already complete is returned unchanged and nothing is started twice.",
                "summary": "Complete the setup",
                "tags": [
                    "Connections"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The financial connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Connection setup completed."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/FinancialConnectionResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts": {
            "get": {
                "operationId": "financial.accounts.index",
                "description": "Returns a paginated list of the authenticated user's financial accounts.",
                "summary": "List all financial accounts",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "omit_sensitive_identifiers",
                        "in": "query",
                        "description": "Omit sensitive financial account/card number identifiers, and certain direct identifiers from the response.\nCurrently, the following fields will be omitted: `iban`, `bban`, `scan`, `owner_name`, `owner_address`, `bic`, `msisdn`, `account_number_masked`, `integrator_id`, `institution_id`.\nFiltering on the omitted identifiers (`filter[iban]`, `filter[bban]`, `filter[bic]`, `filter[integrator_id]`, `filter[institution_id]`) is refused with 422.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[display_name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[enabled]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[financial_connection_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[bban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[iban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[institution_config_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[bic]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[currency]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[product_name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[source_type]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[integrator_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[institution_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[account_category]",
                        "in": "query",
                        "description": "Filter by the account's category or provider. Accepts a single value or comma-separated list:\n?filter[account_category]=BANK|INVESTMENT|DEPOSIT|LOC\n?filter[integrator]=GOCARDLESS|AKAHU|SNAPTRADE",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[integrator]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[category]",
                        "in": "query",
                        "description": "Filter by the institution's category \u2014 distinguishes crypto\nexchanges (e.g. Coinbase, Kraken) from regular brokerages.\n?filter[category]=CRYPTO       \u2192 only crypto-exchange accounts\n?filter[category]=BROKERAGE    \u2192 only brokerage accounts",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[domain]",
                        "in": "query",
                        "description": "Filter by data domain: `bank` returns bank accounts (including\ndemo banks), `asset` returns investment, brokerage and crypto\naccounts. The account's own category decides for providers that\nserve both kinds on one connection.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "name",
                                    "-name",
                                    "display_name",
                                    "-display_name",
                                    "bban",
                                    "-bban",
                                    "iban",
                                    "-iban",
                                    "last_synced_at",
                                    "-last_synced_at",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "rules",
                                    "transfer_links",
                                    "transfer_links_count",
                                    "financial_connection",
                                    "financial_connection.institution"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `FinancialAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/FinancialAccountResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "config",
                                                            "health"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}": {
            "get": {
                "operationId": "financial.accounts.show",
                "description": "Returns a single financial account, including its configuration, health, and attached rules.",
                "summary": "Get financial account",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`FinancialAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/FinancialAccountResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_connection",
                                                        "config",
                                                        "health",
                                                        "rules"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "financial.accounts.update",
                "summary": "Update financial account",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateFinancialAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Financial account updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/FinancialAccountResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_connection",
                                                        "config",
                                                        "health",
                                                        "rules"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "financial.accounts.destroy",
                "description": "Deleting a financial account will also delete all associated data, like balances, transactions, and transfer links.",
                "summary": "Delete financial account",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/bulk-delete": {
            "post": {
                "operationId": "financial.accounts.bulk-delete",
                "description": "Deletes multiple financial accounts in one request. Returns a per-account result indicating success or failure,\nso a partial failure does not fail the whole request. Deleting an account also deletes all of its associated\ndata, like balances, holdings, transactions, and transfer links.",
                "summary": "Bulk delete financial accounts",
                "tags": [
                    "Accounts"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkDeleteFinancialAccountsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Bulk delete completed."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "deleted_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "failed_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "account_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Financial account deleted."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "account_id",
                                                                    "name",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "account_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Failed to delete financial account."
                                                                    },
                                                                    "error": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "account_id",
                                                                    "name",
                                                                    "success",
                                                                    "message",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "account_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "null"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Financial account not found or does not belong to the user."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "account_id",
                                                                    "name",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "deleted_count",
                                                "failed_count",
                                                "results"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/sync": {
            "post": {
                "operationId": "financial.accounts.sync",
                "description": "Initiates a sync of the account's data from the provider. Syncing is processed asynchronously.\nManual syncs are rate limited; a 429 response indicates the requested data was synced recently.",
                "summary": "Sync financial account data",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SyncFinancialAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Sync initiated. If there is any new data available, it will be fetched shortly."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Financial connection is disabled. Please enable the bank connection to sync data."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "This account is currently inactive at your bank, so a sync won't retrieve new data. Please reconnect the bank to restore access."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/reset-config": {
            "delete": {
                "operationId": "financial.accounts.reset-config",
                "description": "Removes the account's custom configuration so the default configuration applies.",
                "summary": "Reset financial account config to defaults",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Financial account config reset to defaults."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/FinancialAccountResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "config"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/balances": {
            "get": {
                "operationId": "financial.accounts.balances.index",
                "description": "Returns a paginated list of balance entries recorded for the account.",
                "summary": "List all account balance entries",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[currency]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[type]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[reference_date]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-reference_date",
                                "integrator_last_changed_at",
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at",
                                    "reference_date",
                                    "-reference_date",
                                    "id",
                                    "-id"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `FinancialAccountBalanceResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/FinancialAccountBalanceResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/balances/{balanceId}": {
            "get": {
                "operationId": "financial.accounts.balances.show",
                "summary": "Get account balance entry",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "balanceId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account balance ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`FinancialAccountBalanceResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/FinancialAccountBalanceResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/holdings": {
            "get": {
                "operationId": "financial.accounts.holdings.index",
                "description": "Returns the current holdings (positions) snapshot for an investment-\ncategory financial account. Holdings are replaced on every sync, so\nthe list reflects the user's current portfolio \u2014 not history.\n\nOnly SnapTrade-fed accounts (crypto / brokerage) populate holdings;\nbank-fed accounts will always return an empty list.\n\nFilter by `symbol`, `asset_class`, `currency`, or `integrator`. Sort\nby `symbol`, `market_value`, `quantity`, `synced_at`, `created_at`,\nor `id`. Default sort is largest-by-market-value first.",
                "summary": "List account holdings",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[symbol]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[asset_class]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[currency]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[integrator]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-market_value",
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "symbol",
                                    "-symbol",
                                    "market_value",
                                    "-market_value",
                                    "quantity",
                                    "-quantity",
                                    "synced_at",
                                    "-synced_at",
                                    "created_at",
                                    "-created_at",
                                    "id",
                                    "-id"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `AccountHoldingResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AccountHoldingResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/holdings/{holdingId}": {
            "get": {
                "operationId": "financial.accounts.holdings.show",
                "summary": "Get account holding",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "holdingId",
                        "in": "path",
                        "required": true,
                        "description": "The holding ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AccountHoldingResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AccountHoldingResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/enrichment-status": {
            "get": {
                "operationId": "financial.accounts.enrichment-status",
                "description": "Progress of the one-off enrichment pass over transactions that were\nalready stored when enrichment was switched on for this account. Counts\ncover every backfill this account has run, not only the latest, and only\ntransactions the backfill itself sent: enrichment of newly synced\ntransactions is not reported here.",
                "summary": "Get enrichment backfill status",
                "tags": [
                    "Accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "in_progress": {
                                                    "type": "boolean",
                                                    "description": "Whether the backfill is still expected to produce results."
                                                },
                                                "awaiting_provider": {
                                                    "type": "integer",
                                                    "description": "Sent to the provider, no result back yet.",
                                                    "minimum": 0
                                                },
                                                "enriched": {
                                                    "type": "integer",
                                                    "description": "Enrichment stored.",
                                                    "minimum": 0
                                                },
                                                "failed": {
                                                    "type": "integer",
                                                    "description": "Sent, given up on: the provider returned nothing for them.",
                                                    "minimum": 0
                                                },
                                                "last_started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time",
                                                    "description": "When the most recent backfill started, null if none ever ran."
                                                }
                                            },
                                            "required": [
                                                "in_progress",
                                                "awaiting_provider",
                                                "enriched",
                                                "failed",
                                                "last_started_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/transactions": {
            "get": {
                "operationId": "financial.transactions.index",
                "description": "To improve efficiency and developer experience, most empty transaction fields are omitted from the response.\nFields that are marked as required in the API specification are always included, even if they are empty.",
                "summary": "List all transactions",
                "tags": [
                    "Transactions"
                ],
                "parameters": [
                    {
                        "name": "omit_sensitive_identifiers",
                        "in": "query",
                        "description": "Omit sensitive financial account/card number identifiers, certain direct identifiers, and external transaction identifiers from the response.\nIf you include `financial_account` in your request, sensitive financial account identifiers will also be omitted. See the financial account endpoint for more information.\nCurrently, the following fields will be omitted: `debtor.iban`, `debtor.bban`, `creditor.iban`, `creditor.bban`, `debtor.pan`, `debtor.masked_pan`, `creditor.pan`, `creditor.masked_pan`, `debtor.msisdn`, `creditor.msisdn`, `external_identifiers.institution_transaction_id`, `external_identifiers.integrator_transaction_id`, `external_identifiers.end_to_end_id`, `external_identifiers.entry_reference`, `external_identifiers.check_id`, `external_identifiers.mandate_id`, `currency_exchange.contract_identification`.\nIBANs the bank wrote into transaction text (`mapped_fields.payee`, `mapped_fields.description`, `debtor.name`, `creditor.name`, `ultimate_debtor`, `ultimate_creditor`, `remittance_information.*`, `additional_information`, `additional_information_structured`, `additional_data_structured`) are replaced with `[hidden: account number]`; the rest of the text, payment references included, is kept.\nFiltering on the omitted identifiers (`filter[debtor.iban]`, `filter[financial_account.iban]`, `filter[external_identifiers.institution_transaction_id]` and the like) is refused with 422, and so is an IBAN in `filter[search]` or in a text filter such as `filter[remittance_information.unstructured]`.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "with_available_financial_accounts",
                        "in": "query",
                        "description": "Include a list of available financial accounts in the response meta.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "disable_rules",
                        "in": "query",
                        "description": "Return raw transaction data without applying the account's output rules. Only available to platform API clients; delegated apps always receive rule-shaped data.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[financial_account.name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[financial_account.display_name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[financial_account.bban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[financial_account.iban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[debtor.bban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[debtor.iban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[creditor.bban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[creditor.iban]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[creditor.name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[debtor.name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[external_identifiers.institution_transaction_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[remittance_information.structured]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[remittance_information.unstructured]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[remittance_information.structured_array]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[remittance_information.unstructured_array]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[additional_information]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[additional_information_structured]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[additional_data_structured]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[financial_account_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[booked]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[currency]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[counterparty_financial_account_id]",
                        "in": "query",
                        "description": "Only transactions whose counterparty is this own account (internal transfers to or from it).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[pairing_status]",
                        "in": "query",
                        "description": "Only transactions in this pairing state: `PENDING`, `PAIRED` or `EXPIRED`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[booking_date_after]",
                        "in": "query",
                        "description": "Only include transactions whose booking date is on or after this date (inclusive), e.g. `2026-06-01`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[booking_date_before]",
                        "in": "query",
                        "description": "Only include transactions whose booking date is on or before this date (inclusive), e.g. `2026-06-30`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[value_date_after]",
                        "in": "query",
                        "description": "Only include transactions whose value date is on or after this date (inclusive).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[value_date_before]",
                        "in": "query",
                        "description": "Only include transactions whose value date is on or before this date (inclusive).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transfer_status]",
                        "in": "query",
                        "description": "Only transactions in these transfer states: `SUCCESSFUL`, `FAILED` or `NONE`. Requires the `transfer-links:read` scope (403 without it).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[reference]",
                        "in": "query",
                        "description": "Filter by the owning connection's caller-supplied correlation\nid (see financial_connections.reference). Exact match, single\nor comma-separated multi-value:\n?filter[reference]=my-user-123\n?filter[reference]=my-user-123,my-user-456",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for transactions by commonly populated fields, such as debtor name, creditor name, remittance information, etc.\nUnder `omit_sensitive_identifiers` account numbers and bank references are not searched, and a term holding an IBAN is rejected with 422.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at",
                                    "booking_date",
                                    "-booking_date",
                                    "value_date",
                                    "-value_date",
                                    "amount",
                                    "-amount",
                                    "booking_datetime",
                                    "-booking_datetime",
                                    "value_datetime",
                                    "-value_datetime",
                                    "currency_exchange.quotation_date",
                                    "-currency_exchange.quotation_date",
                                    "mapped_fields.date",
                                    "-mapped_fields.date"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "financial_account",
                                    "financial_account.financial_connection",
                                    "financial_account.financial_connection.institution",
                                    "transfer_logs",
                                    "enriched",
                                    "trade",
                                    "failed_transfers",
                                    "attempted_transfers"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of items",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "financial.transactions.store",
                "description": "For most users, this endpoint is not needed. Transactions are normally synced automatically once a financial connection is established.\nHowever, if you want to manually push transactions from some other source that is not integrated with Synci, you can use this endpoint.",
                "summary": "Create a new transaction",
                "tags": [
                    "Transactions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTransactionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Transaction created."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/TransactionResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/transactions/{transactionId}": {
            "get": {
                "operationId": "financial.transactions.show",
                "summary": "Get transaction",
                "tags": [
                    "Transactions"
                ],
                "parameters": [
                    {
                        "name": "transactionId",
                        "in": "path",
                        "required": true,
                        "description": "The transaction ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "disable_rules",
                        "in": "query",
                        "description": "Return raw transaction data without applying the account's output rules. Only available to platform API clients; delegated apps always receive rule-shaped data.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "financial_account",
                                    "financial_account.financial_connection",
                                    "financial_account.financial_connection.institution",
                                    "transfer_logs",
                                    "enriched",
                                    "trade",
                                    "failed_transfers",
                                    "attempted_transfers"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`TransactionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransactionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "trade",
                                                        "enriched"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "put": {
                "operationId": "financial.transactions.update",
                "description": "For most users, this endpoint is not needed. Transactions are normally synced (and updated) automatically once a financial connection is established.\nWe do not recommend editing transactions manually unless you have a good reason, as this can lead to inconsistencies in your data.",
                "summary": "Update transaction",
                "tags": [
                    "Transactions"
                ],
                "parameters": [
                    {
                        "name": "transactionId",
                        "in": "path",
                        "required": true,
                        "description": "The transaction ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateTransactionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Transaction updated."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/TransactionResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "financial.transactions.destroy",
                "summary": "Delete transaction",
                "tags": [
                    "Transactions"
                ],
                "parameters": [
                    {
                        "name": "transactionId",
                        "in": "path",
                        "required": true,
                        "description": "The transaction ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/transactions/bulk-delete": {
            "post": {
                "operationId": "financial.transactions.bulk-delete",
                "description": "Deletes multiple transactions in one request. Returns a per-transaction result indicating success or failure.",
                "summary": "Bulk delete transactions",
                "tags": [
                    "Transactions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkDeleteTransactionsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Bulk delete completed."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transaction_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Transaction deleted."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transaction_id",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transaction_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Failed to delete transaction."
                                                                    },
                                                                    "error": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transaction_id",
                                                                    "success",
                                                                    "message",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transaction_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Transaction not found or does not belong to the user."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transaction_id",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "results"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/finance/transactions/{transactionId}/pairing-candidates": {
            "get": {
                "operationId": "financial.transactions.pairing-candidates",
                "description": "Transactions on the counterparty account that could be the other side of this one: opposite sign,\nnot paired with anything else, booked within 30 days. Closest booking date first. Empty when the\ntransaction has no counterparty account. Pair one by sending its id as `counterparty_transaction_id`\nto the update endpoint.",
                "summary": "Pairing candidates",
                "tags": [
                    "Transactions"
                ],
                "parameters": [
                    {
                        "name": "transactionId",
                        "in": "path",
                        "required": true,
                        "description": "The transaction ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "disable_rules",
                        "in": "query",
                        "description": "Return raw transaction data without applying the account's output rules. Only available to platform API clients; delegated apps always receive rule-shaped data.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of items",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/finance/accounts/manual": {
            "post": {
                "operationId": "financial.accounts.manual.store",
                "description": "Creates an account Synci does not sync from a provider, under the user's \"Manual accounts\" connection.\n\nA `LOAN`: give it today's balance, the rate and the fee, and either the bank account that pays it (its\nmatched payments then post the payment, interest and fee rows and keep the balance current) or a fixed\npayment schedule. The account carries an `OPENING` row dated `balance_date`.\n\nA `BANK` account (`cash_account_type` CACC, SVGS or CARD): a checking, savings or card account the user\nfills from statement files through the import endpoints. Its signed `balance` today is optional; when\nabsent the balance stays unknown until the first import with a closing balance or a checkpoint.\n\nAn optional `institution_name` (the bank or lender, as the user wants it shown) groups manual accounts in\nthe dashboard; it is also editable through the account update endpoint.\n\nThe plan feature `manual_accounts_max` caps how many a user may hold (Basic one, Pro and above\nunlimited). One more than that is a 403 with `feature: manual_accounts_max`, `current` and `limit`.",
                "summary": "Create a manual account",
                "tags": [
                    "Loans"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateManualFinancialAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Manual account created."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/FinancialAccountResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan": {
            "put": {
                "operationId": "financial.accounts.loan.update",
                "description": "Everything on the `loan` object except the rate, which has its own endpoint. Changing the fee or the\nday count applies to payments from now on. Setting a paying account turns schedule mode off.",
                "summary": "Update loan terms",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateLoanTermsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Loan terms updated."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/LoanTermsResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/rate-periods": {
            "post": {
                "operationId": "financial.accounts.loan.rate-periods.store",
                "description": "A new annual rate from a date onward. The date must be on or after the loan's last accrual date;\ninterest from that date is recomputed. Settles a pending payment-change question dated on or before it.",
                "summary": "Add a rate period",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLoanRatePeriodRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rate period added."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/LoanTermsResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/rate-periods/{effectiveFrom}": {
            "delete": {
                "operationId": "financial.accounts.loan.rate-periods.destroy",
                "description": "Only the latest rate period can be removed, and only while no interest has accrued at it.",
                "summary": "Remove a rate period",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "effectiveFrom",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "effective_from",
                        "in": "query",
                        "required": true,
                        "description": "The start date (YYYY-MM-DD) of the rate period to remove.",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rate period removed."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/LoanTermsResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/checkpoints": {
            "post": {
                "operationId": "financial.accounts.loan.checkpoints.store",
                "description": "The balance the bank shows on a date. When it differs from the balance Synci derived, an `ADJUSTMENT`\nrow for the difference is posted on that date and the anchor moves there; rows before it are never\nrewritten.",
                "summary": "Verify the balance",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLoanCheckpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Balance verified; it matched.",
                                                "Balance verified; an adjustment was posted."
                                            ]
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "loan": {
                                                    "$ref": "#/components/schemas/LoanTermsResource"
                                                },
                                                "adjustment": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "The ADJUSTMENT row posted for the difference, or null when the balance matched.",
                                                    "properties": {
                                                        "amount": {
                                                            "type": "number"
                                                        },
                                                        "transaction_id": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "amount",
                                                        "transaction_id"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "loan",
                                                "adjustment"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/dismiss-payment-change": {
            "post": {
                "operationId": "financial.accounts.loan.dismiss-payment-change",
                "description": "The user says the changed payment amount was not a rate change: it becomes the regular amount and the\nprompt clears.",
                "summary": "Dismiss a payment change",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Payment change dismissed."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/LoanTermsResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/candidate-payments": {
            "get": {
                "operationId": "financial.accounts.loan.candidate-payments",
                "description": "Outflows on the loan's paying account over the last 120 days, in the loan's currency, that recur at a\nmonthly cadence within a small amount tolerance, most frequent first, at most 30. A heuristic to\npreselect examples in the setup wizard; nothing is stored.",
                "summary": "Suggest loan payments",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "transaction_id": {
                                                        "type": "string"
                                                    },
                                                    "booking_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "amount": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "counterparty_name": {},
                                                    "recurrence_count": {
                                                        "type": "integer",
                                                        "minimum": 0
                                                    }
                                                },
                                                "required": [
                                                    "transaction_id",
                                                    "booking_date",
                                                    "amount",
                                                    "currency",
                                                    "counterparty_name",
                                                    "recurrence_count"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/loan/balance": {
            "get": {
                "operationId": "financial.accounts.loan.balance",
                "description": "The balance Synci derives for the end of a day, from the anchor and the rows posted since (or before).\nLets a client preview what a checkpoint on that date would adjust by.",
                "summary": "Derived loan balance on a date",
                "tags": [
                    "Loans"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "The date to derive the balance for. Defaults to today.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "date": {
                                                    "type": "string"
                                                },
                                                "balance": {
                                                    "type": "number",
                                                    "description": "Signed like the account balance: negative while debt is outstanding."
                                                }
                                            },
                                            "required": [
                                                "date",
                                                "balance"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/balance": {
            "get": {
                "operationId": "financial.accounts.balance",
                "description": "The balance Synci derives for a manual account at the end of a day: the last verified balance (the anchor)\nplus the booked rows since, or minus the rows after the date for a day before the anchor. Signed like the\naccount balance. Null for a manual bank account whose balance is not known yet. Lets a client preview what a\ncheckpoint on that date would adjust by. Serves manual loans too.",
                "summary": "Derived balance on a date",
                "tags": [
                    "Manual accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "The date to derive the balance for. Defaults to today.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "date": {
                                                    "type": "string"
                                                },
                                                "balance": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ],
                                                    "description": "Signed like the account balance: negative for debt. Null while unknown."
                                                }
                                            },
                                            "required": [
                                                "date",
                                                "balance"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/balance-checkpoints": {
            "post": {
                "operationId": "financial.accounts.balance-checkpoints.store",
                "description": "The balance the bank shows at the end of a date, signed. When the account already had a verified balance and\nthe derived balance on that date differs, an `ADJUSTMENT` row for the difference is posted on that date;\nrows before it are never rewritten. The date becomes the new anchor. A first checkpoint on an account\nwithout a known balance simply sets it. Serves manual loans too (a loan's balance is negative).",
                "summary": "Verify the balance",
                "tags": [
                    "Manual accounts"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateManualBalanceCheckpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Balance verified; it matched.",
                                                "Balance verified; an adjustment was posted."
                                            ]
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "balance": {
                                                    "type": [
                                                        "string",
                                                        "number"
                                                    ]
                                                },
                                                "reference_date": {
                                                    "type": "string"
                                                },
                                                "adjustment": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "The ADJUSTMENT row posted for the difference, or null when the balance matched (or was not known before).",
                                                    "properties": {
                                                        "amount": {
                                                            "type": "number"
                                                        },
                                                        "transaction_id": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "amount",
                                                        "transaction_id"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "balance",
                                                "reference_date",
                                                "adjustment"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports": {
            "get": {
                "operationId": "financial.accounts.imports.index",
                "description": "The account's import history, newest first, without previews.",
                "summary": "List imports",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[format]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "committed_at",
                                    "-committed_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ImportBatchResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ImportBatchResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "financial.accounts.imports.store",
                "description": "Detects the format (camt.053, OFX/QFX or CSV), parses the file, checks every row against the account for\nduplicates and returns the batch in `PENDING_REVIEW` with a preview. A CSV is read with the account's saved\nmapping when it has one, otherwise with a proposed mapping and a confidence per column; adjust it with the\nmapping endpoint. Nothing is written until the batch is committed. The same file uploaded twice into one\naccount is a `409` with `code: duplicate_import_file` and the earlier batch's id. Files over 10 MB or 20,000\nrows, and files Synci cannot read, are a `422`.",
                "summary": "Upload a statement file",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreImportBatchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "File parsed. Review the rows and commit the import."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ImportBatchResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports/{importId}": {
            "get": {
                "operationId": "financial.accounts.imports.show",
                "description": "With the preview while the batch is `PENDING_REVIEW`; poll it while `COMMITTING` or `UNDOING`.",
                "summary": "Get an import",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ImportBatchResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "financial.accounts.imports.destroy",
                "description": "Deletes a batch still under review together with its uploaded file.",
                "summary": "Discard an import",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Only an import under review can be discarded."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports/{importId}/rows": {
            "get": {
                "operationId": "financial.accounts.imports.rows",
                "description": "Every row of the file in file order, paginated (`page[size]` 10 to 100, default 25), with its fate (`NEW`,\n`DUPLICATE` or `INVALID`) and the reason, the raw cells for a CSV, and the fields read with the batch's current\nmapping: after a mapping change the next request reflects it. Available in every status but `EXPIRED`, whose\nrows are gone with the file (a `409`); after the commit the rows are the record of what was decided.",
                "summary": "List an import's rows",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ImportBatchRowResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ImportBatchRowResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "This upload has expired. Upload the file again."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports/{importId}/mapping": {
            "put": {
                "operationId": "financial.accounts.imports.mapping.update",
                "description": "Re-reads a CSV batch under review with a different mapping and returns a new preview; the rows endpoint then\nserves the re-read rows. The mapping must name a date column and an amount column (or debit and credit\ncolumns), and no column may feed two fields. A `counterparty_account` column is accepted and ignored.",
                "summary": "Change the CSV mapping",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateImportMappingRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Mapping applied."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ImportBatchResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "The mapping can only be changed while the import is under review."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Only a CSV import has a column mapping."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports/{importId}/commit": {
            "post": {
                "operationId": "financial.accounts.imports.commit",
                "description": "Writes the new rows in the background: rules, enrichment, counterparty pairing, destinations and webhooks\nrun exactly as for a provider sync, with `origin = IMPORT`. A closing balance in the file is recorded as a\nbalance checkpoint. Returns `202` with the batch `COMMITTING`; poll the batch until it is `COMPLETED` or\n`FAILED`.",
                "summary": "Commit an import",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CommitImportBatchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Import started."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ImportBatchResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "This upload has expired. Upload the file again."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Only an import under review can be committed."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/finance/accounts/{accountId}/imports/{importId}/undo": {
            "post": {
                "operationId": "financial.accounts.imports.undo",
                "description": "Removes the rows a `COMPLETED` batch wrote, taking them back from every destination that supports deletion,\nin the background. Returns `202` with the batch `UNDOING`; poll it until it is `UNDONE`. An undo that `FAILED`\n(a destination would not give a row back) can be started again; it continues where it stopped.",
                "summary": "Undo an import",
                "tags": [
                    "Imports"
                ],
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "importId",
                        "in": "path",
                        "required": true,
                        "description": "The import batch ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Undo started."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ImportBatchResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Only a completed import can be undone."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/institutions/countries": {
            "get": {
                "operationId": "financial.institutions.countries.index",
                "description": "Get a list of countries supported by Synci's financial integrators.",
                "summary": "Get supported countries",
                "tags": [
                    "Institutions"
                ],
                "parameters": [
                    {
                        "name": "integrator",
                        "in": "query",
                        "description": "Specify which open banking integrator to get supported countries for (shows all supported countries across integrators if not provided)\n| |\n|---|\n| `UNKNOWN` <br/>  |\n| `GOCARDLESS` <br/>  |\n| `AKAHU` <br/>  |\n| `ARRAY` <br/> US banks. One connection can carry depository, liability and investment accounts, and transactions arrive already enriched. Connections cannot be created through the API: the consent flow is an embedded SDK, so they are started from the Synci Dashboard or the connection portal. |\n| `SNAPTRADE` <br/>  |\n| `DEMO` <br/> Synci's demo banks. Accounts, balances and transactions are generated by Synci rather than fetched from a bank, and otherwise behave like real data: syncs, webhooks and transfer links all run. |\n| `MANUAL` <br/> Accounts the user maintains by hand: today manual loan accounts, whose rows Synci generates from the loan terms and the payments it matches. Each user has one \"Manual accounts\" connection, created lazily, that never syncs and has no provider handler. |",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#/components/schemas/IntegratorEnum"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "countries": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "countries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/finance/institutions": {
            "get": {
                "operationId": "financial.institutions.index",
                "description": "Get a list of all supported institutions. Use the institution IDs when creating new financial connections.",
                "summary": "List all supported institutions",
                "tags": [
                    "Institutions"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[integrator]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[country]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[bic]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[category]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[external_id]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[supports_card_accounts]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[supports_pending_transactions]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[supported]",
                        "in": "query",
                        "description": "Filter by support status. Only supported institutions are\nlisted unless you ask otherwise: `filter[supported]=false`\nlists the retired ones instead.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[domain]",
                        "in": "query",
                        "description": "Filter by data domain: `bank` returns banking institutions,\n`asset` returns brokerages and crypto exchanges. Synci's demo\nbanks are not part of `bank` here; list them with\n`filter[integrator]=DEMO`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for supported banks by name or BIC/SWIFT code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "name",
                                    "-name",
                                    "category",
                                    "-category"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[institutions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "name",
                                    "integrator",
                                    "country",
                                    "bic",
                                    "external_id",
                                    "supported",
                                    "logo",
                                    "domain",
                                    "category"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `InstitutionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/InstitutionResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/finance/institutions/{institutionId}": {
            "get": {
                "operationId": "financial.institutions.show",
                "description": "Get a supported institution. Use the institution IDs when creating new financial connections.",
                "summary": "Get supported institution",
                "tags": [
                    "Institutions"
                ],
                "parameters": [
                    {
                        "name": "institutionId",
                        "in": "path",
                        "required": true,
                        "description": "The institution ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`InstitutionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/InstitutionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections": {
            "get": {
                "operationId": "destinations.ynab.connections.index",
                "description": "Returns the YNAB connections that belong to the authenticated user.\nConnections that never completed YNAB authorization are not included.",
                "summary": "List all YNAB connections",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "budgets",
                                    "budgets.accounts",
                                    "budgets.accounts.transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `YnabConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/YnabConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "budgets"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.ynab.connections.connect",
                "description": "When creating a new YNAB connection, Synci will generate an authorization URL (auth_url).\nYou should follow the authorization URL to activate the connection.\nOnce the connection is authorized, Synci will automatically fetch available budgets and budget accounts.",
                "summary": "Create new YNAB connection",
                "tags": [
                    "YNAB"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateYnabConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Connection created. Follow the URL to start the authentication process with YNAB."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "auth_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ynab_connection": {
                                                    "$ref": "#/components/schemas/YnabConnectionResource"
                                                }
                                            },
                                            "required": [
                                                "auth_url",
                                                "ynab_connection"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}": {
            "get": {
                "operationId": "destinations.ynab.connections.show",
                "description": "Returns a single YNAB connection, including its budgets and budget accounts.",
                "summary": "Get YNAB connection",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`YnabConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/YnabConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "budgets"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.ynab.connections.destroy",
                "description": "Deleting a YNAB connection will also delete all associated data, like budgets and budget accounts.",
                "summary": "Delete YNAB connection",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.ynab.connections.update",
                "description": "Update the connection's display name, or enable/disable syncing through it.",
                "summary": "Update YNAB connection",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateYnabConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YNAB connection updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/YnabConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "budgets"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}/refresh": {
            "post": {
                "operationId": "destinations.ynab.connections.refresh",
                "description": "Triggers a background refresh of the connection's budgets and budget accounts.\nUse this when you've added or renamed budgets/accounts in YNAB and want Synci\nto pick up the changes without waiting for the next scheduled sync.\n\nRate limited to once per minute per connection.",
                "summary": "Refresh YNAB connection",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YNAB connection refresh queued. Budgets and accounts will update shortly."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}/budgets": {
            "get": {
                "operationId": "destinations.ynab.budgets.index",
                "description": "Returns the YNAB budgets synced from this connection.",
                "summary": "List all YNAB budgets",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Filter by budget name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[currency]",
                        "in": "query",
                        "description": "Filter by budget currency.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[ynab_id]",
                        "in": "query",
                        "description": "Filter by the budget's ID in YNAB.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "accounts",
                                    "accounts.transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `YnabBudgetResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/YnabBudgetResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}/budgets/{budgetId}": {
            "get": {
                "operationId": "destinations.ynab.budgets.show",
                "description": "Returns a single YNAB budget, including its accounts.",
                "summary": "Get YNAB budget",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`YnabBudgetResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/YnabBudgetResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.ynab.budgets.destroy",
                "description": "Deleting a YNAB budget will also delete all associated data, like budget accounts.",
                "summary": "Delete YNAB budget",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.ynab.budgets.update",
                "description": "Enable or disable syncing to this budget.",
                "summary": "Update YNAB budget",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateYnabBudgetRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YNAB budget updated."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/YnabBudgetResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}/budgets/{budgetId}/accounts": {
            "get": {
                "operationId": "destinations.ynab.budgets.accounts.index",
                "description": "Returns the accounts synced from this YNAB budget.",
                "summary": "List all YNAB budget accounts",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Filter by account name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[type]",
                        "in": "query",
                        "description": "Filter by account type.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[on_budget]",
                        "in": "query",
                        "description": "Filter by whether the account is on budget in YNAB (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[closed]",
                        "in": "query",
                        "description": "Filter by whether the account is closed in YNAB (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[direct_import_linked]",
                        "in": "query",
                        "description": "Filter by whether the account is linked to YNAB Direct Import (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[ynab_id]",
                        "in": "query",
                        "description": "Filter by the account's ID in YNAB.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at",
                                    "last_reconciled_at",
                                    "-last_reconciled_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `YnabBudgetAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/YnabBudgetAccountResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.ynab.budgets.accounts.store",
                "description": "Creates the account in YNAB and stores it in Synci, so it can be used as\na transfer link destination right away. The starting balance is in\ncurrency units, negative for a liability, and becomes YNAB's \"Starting\n     * Balance\" transaction: leave it at 0 when Synci will sync the account's\nhistory, or that history is counted twice. YNAB rejects a name already\nused in the budget; its message is returned as a 422.",
                "summary": "Create YNAB budget account",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateYnabBudgetAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YNAB account created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/YnabBudgetAccountResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "budget",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YNAB is refreshing its credentials. Please try again in a moment."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/ynab/connections/{connectionId}/budgets/{budgetId}/accounts/{budgetAccountId}": {
            "get": {
                "operationId": "destinations.ynab.budgets.accounts.show",
                "description": "Returns a single YNAB budget account, including its transfer links, rules, and health status.",
                "summary": "Get YNAB budget account",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetAccountId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`YnabBudgetAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/YnabBudgetAccountResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.ynab.budgets.accounts.destroy",
                "description": "Removes the account from Synci along with its transfer links. The account\nitself is not affected in YNAB.",
                "summary": "Delete YNAB budget account",
                "tags": [
                    "YNAB"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "budgetAccountId",
                        "in": "path",
                        "required": true,
                        "description": "The YNAB budget account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/lunch-money/connections": {
            "get": {
                "operationId": "destinations.lunch-money.connections.index",
                "description": "Returns the Lunch Money connections that belong to the authenticated user.",
                "summary": "List all Lunch Money connections",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[enabled]",
                        "in": "query",
                        "description": "Filter by whether the connection is enabled (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[lunch_money_details.budget_name]",
                        "in": "query",
                        "description": "Filter by budget name (partial match).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[lunch_money_details.primary_currency]",
                        "in": "query",
                        "description": "Filter by primary currency (partial match).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "accounts",
                                    "accounts.transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `LunchMoneyConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/LunchMoneyConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.lunch-money.connections.connect",
                "description": "Connects a Lunch Money account using a Lunch Money API access token.\nSynci validates the token, then imports the budget details and accounts.",
                "summary": "Create new Lunch Money connection",
                "tags": [
                    "Lunch Money"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/CreateLunchMoneyConnectionRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "sync_balances": {
                                                "type": "boolean",
                                                "default": true
                                            },
                                            "sync_transactions": {
                                                "type": "boolean",
                                                "default": true
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Failed to create Lunch Money connection."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Lunch Money connection created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/LunchMoneyConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/lunch-money/connections/{connectionId}": {
            "get": {
                "operationId": "destinations.lunch-money.connections.show",
                "description": "Returns a single Lunch Money connection, including its accounts and health status.",
                "summary": "Get Lunch Money connection",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`LunchMoneyConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/LunchMoneyConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "accounts"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.lunch-money.connections.destroy",
                "description": "Deleting a Lunch Money connection will also delete all associated data, like accounts and their transfer links.",
                "summary": "Delete Lunch Money connection",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.lunch-money.connections.update",
                "description": "Enable or disable the connection, or supply a new access token to rotate\ncredentials. New tokens are validated with Lunch Money before the\nconnection's details and accounts are refreshed.",
                "summary": "Update Lunch Money connection",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateLunchMoneyConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Failed to update Lunch Money connection."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "enum": [
                                                        "Lunch Money connection updated. We re-validated the new access token and refreshed your accounts.",
                                                        "Lunch Money connection updated."
                                                    ]
                                                },
                                                "data": {
                                                    "allOf": [
                                                        {
                                                            "$ref": "#/components/schemas/LunchMoneyConnectionResource"
                                                        },
                                                        {
                                                            "type": "object",
                                                            "required": [
                                                                "health",
                                                                "accounts"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/lunch-money/connections/{connectionId}/refresh": {
            "post": {
                "operationId": "destinations.lunch-money.connections.refresh",
                "description": "Triggers a background refresh of the connection's budget metadata and accounts.\nUse this when you've added or renamed manual accounts in Lunch Money and want\nSynci to pick up the changes without waiting for the next scheduled sync.\n\nRate limited to once per minute per connection.",
                "summary": "Refresh Lunch Money connection",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Lunch Money connection refresh queued. Budget details and accounts will update shortly."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/lunch-money/connections/{connectionId}/accounts": {
            "get": {
                "operationId": "destinations.lunch-money.connections.accounts.index",
                "description": "Returns the Lunch Money accounts synced from this connection.",
                "summary": "List all Lunch Money accounts",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[name]",
                        "in": "query",
                        "description": "Filter by account name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[display_name]",
                        "in": "query",
                        "description": "Filter by display name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[type]",
                        "in": "query",
                        "description": "Filter by account type.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[subtype]",
                        "in": "query",
                        "description": "Filter by account subtype.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[lunch_money_id]",
                        "in": "query",
                        "description": "Filter by the account's ID in Lunch Money (partial match).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at",
                                    "lm_created_at",
                                    "-lm_created_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `LunchMoneyAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LunchMoneyAccountResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.lunch-money.connections.accounts.store",
                "description": "Creates a manual account in Lunch Money and stores it in Synci, so it can\nbe used as a transfer link destination right away. The starting balance\nis in currency units with Synci's sign convention (negative when money\nis owed); Synci converts it to Lunch Money's. Leave it at 0 when Synci\nwill sync the account's history, or that history is counted twice. A\nrejection by Lunch Money, such as a duplicate name, is returned as a 422\nwith its message.",
                "summary": "Create Lunch Money account",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateLunchMoneyAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Lunch Money account created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/LunchMoneyAccountResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/lunch-money/connections/{connectionId}/accounts/{accountId}": {
            "get": {
                "operationId": "destinations.lunch-money.connections.accounts.show",
                "description": "Returns a single Lunch Money account, including its transfer links and health status.",
                "summary": "Get Lunch Money account",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`LunchMoneyAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/LunchMoneyAccountResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.lunch-money.connections.accounts.destroy",
                "description": "Removes the account from Synci along with its transfer links. The account\nitself is not affected in Lunch Money.",
                "summary": "Delete Lunch Money account",
                "tags": [
                    "Lunch Money"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true,
                        "description": "The Lunch Money account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections": {
            "get": {
                "operationId": "destinations.google-sheets.connections.index",
                "description": "Returns the Google Sheets connections that belong to the authenticated user.\nConnections that never completed Google authorization are not included.",
                "summary": "List all Google Sheets connections",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[enabled]",
                        "in": "query",
                        "description": "Filter by whether the connection is enabled (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "sheets",
                                    "sheets.transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `GoogleSheetsConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health",
                                                            "sheets"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.google-sheets.connections.connect",
                "description": "Synci generates an authorization URL (auth_url). Follow it to authorize\nSynci to manage spreadsheets on your behalf. Once authorized, you can\nregister destination spreadsheets and link them to financial accounts.",
                "summary": "Create new Google Sheets connection",
                "tags": [
                    "Google Sheets"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateGoogleSheetsConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Connection created. Follow the URL to start the authentication process with Google."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "auth_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "google_sheets_connection": {
                                                    "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                                                }
                                            },
                                            "required": [
                                                "auth_url",
                                                "google_sheets_connection"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections/{connectionId}": {
            "get": {
                "operationId": "destinations.google-sheets.connections.show",
                "description": "Returns a single Google Sheets connection, including its registered spreadsheets and health status.",
                "summary": "Get Google Sheets connection",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`GoogleSheetsConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "sheets"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.google-sheets.connections.destroy",
                "description": "Deleting a connection also deletes its registered destination sheets and\ntheir transfer links. The spreadsheets themselves remain in the user's\nGoogle Drive.",
                "summary": "Delete Google Sheets connection",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.google-sheets.connections.update",
                "description": "Update the connection's display name, or enable/disable syncing through it.",
                "summary": "Update Google Sheets connection",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateGoogleSheetsConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Google Sheets connection updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "sheets"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections/{connectionId}/refresh": {
            "post": {
                "operationId": "destinations.google-sheets.connections.refresh",
                "description": "Re-validates the stored Google credentials and refreshes the connected\naccount's email. Rate limited to once per minute per connection.",
                "summary": "Refresh Google Sheets connection",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Google Sheets connection refreshed."
                                                },
                                                "data": {
                                                    "allOf": [
                                                        {
                                                            "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                                                        },
                                                        {
                                                            "type": "object",
                                                            "required": [
                                                                "health",
                                                                "sheets"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections/{connectionId}/sheets": {
            "get": {
                "operationId": "destinations.google-sheets.connections.sheets.index",
                "description": "Returns the spreadsheets registered as sync destinations on this connection.",
                "summary": "List destination spreadsheets for a connection",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `GoogleSheetResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/GoogleSheetResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.google-sheets.connections.sheets.store",
                "description": "Either creates a new Synci-managed spreadsheet (mode=create) or attaches\nan existing spreadsheet the user selected (mode=attach).",
                "summary": "Register a destination spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreGoogleSheetRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "This spreadsheet is already added to this Google connection."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Spreadsheet registered."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/GoogleSheetResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections/{connectionId}/sheets/{sheetId}": {
            "get": {
                "operationId": "destinations.google-sheets.connections.sheets.show",
                "description": "Returns a single destination spreadsheet, including its tab assignments, transfer links, and health status.",
                "summary": "Get a destination spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sheetId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheet ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`GoogleSheetResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/GoogleSheetResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.google-sheets.connections.sheets.update",
                "description": "Update the spreadsheet's display name, tab assignments, or column\nconfiguration. When the column configuration changes, previously synced\nrows are reformatted to the new layout asynchronously.",
                "summary": "Update a destination spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sheetId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheet ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateGoogleSheetRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Spreadsheet updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/GoogleSheetResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.google-sheets.connections.sheets.destroy",
                "description": "Removes the Synci record and its transfer links. The spreadsheet itself\nremains in the user's Google Drive.",
                "summary": "Delete a destination spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sheetId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheet ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/google-sheets/connections/{connectionId}/sheets/{sheetId}/tabs": {
            "get": {
                "operationId": "destinations.google-sheets.connections.sheets.tabs.index",
                "description": "Returns the worksheet tabs of the spreadsheet, with their identifiers (gid) and names.",
                "summary": "List the worksheets (tabs) of a spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sheetId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheet ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.google-sheets.connections.sheets.tabs.store",
                "description": "Optionally assigns the new tab to the transactions, current balances, or\nbalance history sync slot and writes the corresponding header row.",
                "summary": "Create a new worksheet (tab) in a spreadsheet",
                "tags": [
                    "Google Sheets"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheets connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sheetId",
                        "in": "path",
                        "required": true,
                        "description": "The Google Sheet ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateGoogleSheetTabRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Tab created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/GoogleSheetResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/simplefin/connections": {
            "get": {
                "operationId": "destinations.simplefin.connections.index",
                "description": "Returns the SimpleFIN connections that belong to the\nauthenticated user.",
                "summary": "List all SimpleFIN connections",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[enabled]",
                        "in": "query",
                        "description": "Filter by whether the connection is enabled (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "accounts"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `SimpleFinConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.simplefin.connections.connect",
                "description": "Creates a SimpleFIN destination and returns a one-time setup token. Paste\nthe token into the consumer app's \"Link bank account with SimpleFIN\"\nflow; it exchanges the token for pull credentials and then syncs the\nexposed accounts on demand. `app` selects which app this connection is\npresented as (Actual Budget by default); it does not change behavior.\nThird-party applications receive `setup_token: null`: the user copies\nthe token from Synci.",
                "summary": "Create new SimpleFIN connection",
                "tags": [
                    "SimpleFIN"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreSimpleFinConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "SimpleFIN connection created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/destinations/simplefin/connections/{connectionId}": {
            "get": {
                "operationId": "destinations.simplefin.connections.show",
                "description": "Returns a single SimpleFIN connection, including its setup token\n(while unclaimed) and health status. The setup token is only returned\nto the connection's owner on a first-party surface; third-party\napplications always receive `setup_token: null`.",
                "summary": "Get SimpleFIN connection",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`SimpleFinConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "accounts"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.simplefin.connections.update",
                "description": "Updates the connection's name, app, enabled state, or exposed accounts.\nAccount changes take effect on the consumer's next pull.",
                "summary": "Update SimpleFIN connection",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSimpleFinConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "SimpleFIN connection updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.simplefin.connections.destroy",
                "description": "Deleting a connection invalidates its setup token and pull credentials\nimmediately; the consumer.s next sync for the linked accounts will fail with a\ncredential error.",
                "summary": "Delete SimpleFIN connection",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "SimpleFIN connection deleted."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/simplefin/connections/{connectionId}/regenerate-token": {
            "post": {
                "operationId": "destinations.simplefin.connections.regenerate-token",
                "description": "Issues a fresh one-time setup token for an unclaimed connection,\ninvalidating the previous token. Claimed connections cannot regenerate;\ncreate a new connection instead.",
                "summary": "Regenerate setup token",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Setup token regenerated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Only pending connections can regenerate their setup token."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/simplefin/connections/{connectionId}/revoke": {
            "post": {
                "operationId": "destinations.simplefin.connections.revoke",
                "description": "Permanently invalidates the connection's SimpleFIN credentials (and any\nunclaimed setup token). Actual's subsequent pulls receive an\nauthorization error until the account is relinked with a new connection.",
                "summary": "Revoke access credentials",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "SimpleFIN connection revoked."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SimpleFinConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Connection is already revoked."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/simplefin/connections/{connectionId}/accounts": {
            "get": {
                "operationId": "destinations.simplefin.connections.accounts.index",
                "description": "Returns the financial accounts a SimpleFIN consumer has been observed syncing\nthrough this connection, with first/last pull timestamps. Purely\ninformational: linking happens inside the consumer app, and unlinking there sends\nno signal (a stale last_pulled_at is the only tell).",
                "summary": "List accounts observed syncing",
                "tags": [
                    "SimpleFIN"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The SimpleFIN connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `SimpleFinAccountResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SimpleFinAccountResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/notion/connections": {
            "get": {
                "operationId": "destinations.notion.connections.index",
                "description": "Returns the Notion connections that belong to the authenticated user.\nConnections that never completed Notion authorization are not included.",
                "summary": "List all Notion connections",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[enabled]",
                        "in": "query",
                        "description": "Filter by whether the connection is enabled (true/false).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "databases",
                                    "databases.transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `NotionConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/NotionConnectionResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health",
                                                            "databases"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.notion.connections.connect",
                "description": "Synci generates an authorization URL (auth_url). Follow it to authorize\nSynci in your Notion workspace: pick the pages Synci may write to, or\nduplicate the Synci template. Once authorized, register destination\ndatabases and link them to financial accounts.",
                "summary": "Create new Notion connection",
                "tags": [
                    "Notion"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateNotionConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Connection created. Follow the URL to start the authentication process with Notion."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "auth_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "notion_connection": {
                                                    "$ref": "#/components/schemas/NotionConnectionResource"
                                                }
                                            },
                                            "required": [
                                                "auth_url",
                                                "notion_connection"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}": {
            "get": {
                "operationId": "destinations.notion.connections.show",
                "description": "Returns a single Notion connection, including its registered databases and health status.",
                "summary": "Get Notion connection",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`NotionConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/NotionConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "databases"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.notion.connections.destroy",
                "description": "Deleting a connection also deletes its registered destination databases\nand their transfer links in Synci. The databases themselves remain in\nthe user's Notion workspace.",
                "summary": "Delete Notion connection",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.notion.connections.update",
                "description": "Update the connection's display name, or enable/disable syncing through it.",
                "summary": "Update Notion connection",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateNotionConnectionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Notion connection updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/NotionConnectionResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "health",
                                                        "databases"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}/refresh": {
            "post": {
                "operationId": "destinations.notion.connections.refresh",
                "description": "Re-validates the stored Notion credentials and refreshes the workspace\nname. Rate limited to once per minute per connection.",
                "summary": "Refresh Notion connection",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Notion connection refreshed."
                                                },
                                                "data": {
                                                    "allOf": [
                                                        {
                                                            "$ref": "#/components/schemas/NotionConnectionResource"
                                                        },
                                                        {
                                                            "type": "object",
                                                            "required": [
                                                                "health",
                                                                "databases"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}/pages": {
            "get": {
                "operationId": "destinations.notion.connections.pages",
                "description": "Lists the Notion pages the connection has access to, for choosing where a\nnew database should be created.",
                "summary": "Search pages shared with Synci",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "next_cursor": {}
                                            },
                                            "required": [
                                                "data",
                                                "next_cursor"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}/data-sources": {
            "get": {
                "operationId": "destinations.notion.connections.data-sources",
                "description": "Lists the Notion databases (data sources) the connection has access to,\nfor attaching an existing database as a destination.",
                "summary": "Search databases shared with Synci",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "next_cursor": {}
                                            },
                                            "required": [
                                                "data",
                                                "next_cursor"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}/databases": {
            "get": {
                "operationId": "destinations.notion.connections.databases.index",
                "description": "Returns the Notion databases registered as sync destinations on this connection.",
                "summary": "List destination databases for a connection",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "transfer_links"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `NotionDatabaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/NotionDatabaseResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "health"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "destinations.notion.connections.databases.store",
                "description": "Either creates a new Synci-managed database under a page shared with\nSynci (mode=create) or attaches an existing database the user selected\n(mode=attach). Any properties Synci needs that are missing from an\nattached database are added; existing properties are never changed.",
                "summary": "Register a destination database",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreNotionDatabaseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Database registered."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/NotionDatabaseResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/destinations/notion/connections/{connectionId}/databases/{databaseId}": {
            "get": {
                "operationId": "destinations.notion.connections.databases.show",
                "description": "Returns a single destination database, including its transfer links and health status.",
                "summary": "Get a destination database",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "databaseId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion database ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`NotionDatabaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/NotionDatabaseResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "destinations.notion.connections.databases.update",
                "description": "Update the database's display name or property configuration. Newly\nconfigured fields are added as properties to the Notion database right\naway; previously synced pages are not backfilled.",
                "summary": "Update a destination database",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "databaseId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion database ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateNotionDatabaseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Database updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/NotionDatabaseResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/NotionDatabaseResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "connection",
                                                        "health"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "destinations.notion.connections.databases.destroy",
                "description": "Removes the Synci record and its transfer links. The database itself\nremains in the user's Notion workspace.",
                "summary": "Delete a destination database",
                "tags": [
                    "Notion"
                ],
                "parameters": [
                    {
                        "name": "connectionId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion connection ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "databaseId",
                        "in": "path",
                        "required": true,
                        "description": "The Notion database ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/webhooks/events": {
            "get": {
                "operationId": "webhooks.events",
                "description": "The delivery log for your webhook endpoints: one entry per delivery\nattempt, with the outcome. Use `include=payload` to include the\ndelivered payload in each event.",
                "summary": "List all webhook events",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[id]",
                        "in": "query",
                        "description": "Only the event with the given ID.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "payload",
                                    "webhook_endpoint"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "filter[event_type]",
                        "in": "query",
                        "description": "Only events of the given event type.",
                        "schema": {
                            "$ref": "#/components/schemas/WebhookEventTypeEnum"
                        }
                    },
                    {
                        "name": "filter[webhook_endpoint_id]",
                        "in": "query",
                        "description": "Only events delivered to the given webhook endpoint.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[success]",
                        "in": "query",
                        "description": "Only successful (true) or failed (false) deliveries.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "filter[status_code]",
                        "in": "query",
                        "description": "Only deliveries that received the given HTTP status code.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `WebhookEventResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEventResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "operationId": "webhooks.index",
                "description": "The webhook endpoints registered by the authenticated user. Signing\nsecrets are not included \u2014 they are only returned on creation and\nrotation. OAuth apps see only the endpoints they created themselves.",
                "summary": "List all webhook endpoints",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpointResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "webhooks.store",
                "description": "The endpoint's signing `secret` is included in this response only \u2014 it\ncannot be read again later, but can be rotated at any time. The number\nof webhook endpoints is subject to your plan's limits (403 when\nexceeded).",
                "summary": "Create new webhook endpoint",
                "tags": [
                    "Webhooks"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook endpoint created."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "You have reached the limit for webhook endpoints in your current plan. Please upgrade to continue."
                                        },
                                        "feature": {
                                            "type": "string",
                                            "const": "webhook_endpoint"
                                        },
                                        "current": {
                                            "type": "integer",
                                            "minimum": 0
                                        },
                                        "limit": {
                                            "type": [
                                                "integer",
                                                "boolean",
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "formatted_limit": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "feature",
                                        "current",
                                        "limit",
                                        "formatted_limit"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpointId}": {
            "get": {
                "operationId": "webhooks.show",
                "description": "Returns a single webhook endpoint, including its delivery health.",
                "summary": "Get webhook endpoint",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpointId",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "webhooks.update",
                "description": "The `payload_version` field is pinned at creation and cannot be changed\nhere. Re-enabling a disabled endpoint is subject to your plan's limit on\nactive endpoints (403 when exceeded).",
                "summary": "Update webhook endpoint",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpointId",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook endpoint updated."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "webhooks.destroy",
                "description": "Deliveries to the endpoint stop immediately.",
                "summary": "Delete webhook endpoint",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpointId",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpointId}/test": {
            "post": {
                "operationId": "webhooks.test",
                "description": "Sends a test delivery of the chosen event type to the endpoint,\nregardless of its event subscriptions. Provide `financial_account_id`\nto build the payload from one of your accounts where possible;\notherwise sample data is sent.",
                "summary": "Test webhook endpoint",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpointId",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TestWebhookRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook test event dispatched."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpointId}/rotate-secret": {
            "post": {
                "operationId": "webhooks.rotate-secret",
                "description": "Generates a new signing secret for the endpoint. The new secret is\nreturned once in this response and cannot be read again; the previous\nsecret stops being used immediately.",
                "summary": "Rotate webhook secret",
                "tags": [
                    "Webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpointId",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook secret rotated. Remember to update your endpoint destination with the new secret."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/user": {
            "get": {
                "operationId": "user.show",
                "description": "Basic identity for the user who authorized your application: id, name,\nemail, whether the email address is verified, and the account creation\ndate. Requires the `profile:read` scope.",
                "summary": "Get the authenticated user",
                "tags": [
                    "User"
                ],
                "responses": {
                    "200": {
                        "description": "`UserProfileResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/UserProfileResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rules": {
            "post": {
                "operationId": "rules.store",
                "description": "Rules automatically categorize or transform transactions. A rule attached to a financial account runs on\nnew transactions as they are fetched from the bank and its changes are permanent; a rule attached to a\ntransfer link runs on transactions as they are transferred and only changes the destination copy.\n\nA rule has **conditions** and **actions**. Conditions decide whether the rule applies; a rule with no\nconditions always applies. Actions run when it does, and every rule needs at least one. Each action that\nruns is recorded as a rule log.\n\nAction values accept [Liquid templates](https://shopify.github.io/liquid/). Reference transaction fields\nwith `{{ transaction.field_name }}` and transform them with filters:\n\n| Filter | Example | Description |\n|--------|---------|-------------|\n| `remove` | `{{ transaction.creditor.name \\| remove: \"PREFIX \" }}` | Remove a substring |\n| `upcase` / `downcase` | `{{ transaction.creditor.name \\| upcase }}` | Change case |\n| `regex_capture` | `{{ transaction.creditor.name \\| regex_capture: '/^(\\w+)/' }}` | Extract a regex capture group |\n| `date_add` | `{{ transaction.booking_date \\| date_add: 7 }}` | Add or subtract days from a date |\n| `remove_at` | `{{ transaction.memo \\| remove_at: 1, 5 }}` | Remove characters at positions |\n| `keep_at` | `{{ transaction.memo \\| keep_at: 6 }}` | Keep only characters from a position |\n\nThe standard Liquid filters (`replace`, `truncate`, `split`, `append`, `prepend`, and so on) are available\ntoo. Values without `{{` or `{%` are literal.\n\nAccount rules (`BANK` scope) attach to bank accounts only; attaching one to a crypto or brokerage account\nreturns `422`. Use a transfer link rule for those. How many conditions, actions and attached rules a plan\nallows is listed on the [pricing page](https://synci.io/pricing).",
                "summary": "Create a new rule",
                "tags": [
                    "Rules"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateRuleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule created."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "get": {
                "operationId": "rules.index",
                "description": "Rules automatically categorize or transform transactions. A rule attached to a financial account runs on\nnew transactions as they are fetched from the bank; a rule attached to a transfer link runs on transactions\nas they are transferred to the destination. See **Create a new rule** for how conditions, actions and\nLiquid templates work.",
                "summary": "List all rules",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[trigger_on_any_condition]",
                        "in": "query",
                        "description": "Filter rules by whether only one condition must match for the rule to be applied.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[skip_other_rules_when_triggered]",
                        "in": "query",
                        "description": "Filter rules by whether they stop other rules from being processed when triggered.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[scope]",
                        "in": "query",
                        "description": "Filter rules by scope, `BANK` or `TRANSFER`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[type]",
                        "in": "query",
                        "description": "Filter rules by legacy rule type, for example `BANK` or `YNAB_TRANSFER_LINK`. Deprecated: filter by `scope` instead.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for rules by commonly populated fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transfer_link_id]",
                        "in": "query",
                        "description": "Filter rules by transfer link ID. This will return rules that are attached to the specified transfer link.",
                        "schema": {
                            "type": "string",
                            "examples": [
                                759921679862647
                            ]
                        }
                    },
                    {
                        "name": "filter[financial_account_id]",
                        "in": "query",
                        "description": "Filter rules by financial account ID. This will return rules that are attached to the specified financial account.",
                        "schema": {
                            "type": "string",
                            "examples": [
                                755065161760068
                            ]
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "name",
                                    "-name",
                                    "updated_at",
                                    "-updated_at",
                                    "created_at",
                                    "-created_at",
                                    "trigger_on_any_condition",
                                    "-trigger_on_any_condition",
                                    "skip_other_rules_when_triggered",
                                    "-skip_other_rules_when_triggered",
                                    "enabled",
                                    "-enabled",
                                    "conditions_count",
                                    "-conditions_count",
                                    "actions_count",
                                    "-actions_count",
                                    "attached_entities",
                                    "-attached_entities"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "conditions",
                                    "conditions_count",
                                    "actions",
                                    "actions_count",
                                    "financial_accounts",
                                    "financial_accounts_count",
                                    "transfer_links",
                                    "transfer_links_count"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `RuleResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/RuleResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rules/{ruleId}": {
            "get": {
                "operationId": "rules.show",
                "summary": "Get rule",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`RuleResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/RuleResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "rules.update",
                "description": "Any field may be omitted to leave it unchanged. For rules that have been\nmigrated, only `name`, `description`, `enabled`, and the `value` of\nexisting actions can be updated.",
                "summary": "Update rule",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/UpdateRuleRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "trigger_on_any_condition": {
                                                "type": "boolean",
                                                "description": "When true, the rule triggers if any condition matches; when false, all conditions must match."
                                            },
                                            "skip_other_rules_when_triggered": {
                                                "type": "boolean",
                                                "description": "When true, no further rules are evaluated once this rule triggers."
                                            },
                                            "conditions": {
                                                "type": "array",
                                                "description": "The full set of conditions for the rule. Include an `id` on an entry to update an existing condition, or omit it to create a new one. Each entry has the same shape as in the create-rule endpoint.",
                                                "items": {}
                                            },
                                            "financial_accounts": {
                                                "type": "array",
                                                "description": "The financial accounts the rule is attached to, each as `{ id, order }`. Only accepted for rules attached to financial accounts.",
                                                "items": {}
                                            },
                                            "transfer_links": {
                                                "type": "array",
                                                "description": "The transfer links the rule is attached to, each as `{ id, order }`. Only accepted for rules attached to transfer links.",
                                                "items": {}
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule updated."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "rules.destroy",
                "summary": "Delete rule",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rules/{ruleId}/accounts/{financialAccountId}": {
            "post": {
                "operationId": "rules.attachToFinancialAccount",
                "description": "Once attached, the rule will be applied to new transactions as they are fetched from the bank.\nUse `order` to place the rule at a specific position, or `order_list` to provide the complete ordered list of rule IDs for the account.",
                "summary": "Attach rule to a financial account",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "financialAccountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AttachRuleToFinancialAccountRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule attached to account."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/RuleResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_accounts"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "rules.detachFromFinancialAccount",
                "summary": "Detach rule from financial account",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "financialAccountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule detached from account."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/RuleResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_accounts"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "accounts.rules.reorder",
                "description": "Sets the execution order of the rules attached to a financial account.\nProvide the complete list of attached rule IDs in the desired order \u2014 rules are applied in ascending order.",
                "summary": "Reorder rules for a financial account",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "financialAccountId",
                        "in": "path",
                        "required": true,
                        "description": "The financial account ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReorderFinancialAccountRulesRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Financial account rules reordered successfully."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "financial_account": {
                                                    "$ref": "#/components/schemas/FinancialAccountResource"
                                                }
                                            },
                                            "required": [
                                                "financial_account"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rules/{ruleId}/transfer-links/{transferLinkId}": {
            "post": {
                "operationId": "rules.attachToTransferLink",
                "description": "Once attached, the rule will be applied to transactions as they are transferred to the destination.",
                "summary": "Attach rule to transfer link",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AttachRuleToTransferLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule attached to transfer link."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "rules.detachFromTransferLink",
                "summary": "Detach rule from transfer link",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule detached from transfer link."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "put": {
                "operationId": "transfer-links.rules.reorder",
                "description": "Sets the execution order of the rules attached to a transfer link.\nProvide the complete list of attached rule IDs in the desired order \u2014 rules are applied in ascending order.",
                "summary": "Reorder rules for a transfer link",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReorderTransferLinkRulesRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Transfer link rules reordered successfully."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "transfer_link": {
                                                    "$ref": "#/components/schemas/TransferLinkResource"
                                                }
                                            },
                                            "required": [
                                                "transfer_link"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rules/suggest": {
            "post": {
                "operationId": "rules.suggest",
                "description": "Derives a `BANK`-scope rule that marks transactions like the given examples as moves to the counterparty\naccount, strongest signal first: the counterparty account number (`HIGH` confidence), a shared prefix of\nthe counterparty name or remittance text (`MEDIUM`), or an amount band (`LOW`). The candidate rule is run\nover the account's last 365 days so the response lists what it would match (ids capped at 500).\n`unmatched_example_ids` names examples the derived rule would not catch. Nothing is saved: open the\nreturned rule in the editor and create it with **Create a new rule**.",
                "summary": "Suggest an internal-transfer rule from examples",
                "tags": [
                    "Rules"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SuggestRuleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "rule": {
                                                    "type": "object",
                                                    "properties": {
                                                        "scope": {
                                                            "type": "string",
                                                            "const": "BANK"
                                                        },
                                                        "trigger_on_any_condition": {
                                                            "type": "boolean"
                                                        },
                                                        "conditions": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "field_name": {
                                                                                    "type": "string",
                                                                                    "const": "amount"
                                                                                },
                                                                                "operator": {
                                                                                    "type": "string",
                                                                                    "const": "GREATER_THAN_OR_EQUAL"
                                                                                },
                                                                                "value": {
                                                                                    "type": "string"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "field_name",
                                                                                "operator",
                                                                                "value"
                                                                            ]
                                                                        },
                                                                        {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "field_name": {
                                                                                    "type": "string",
                                                                                    "const": "amount"
                                                                                },
                                                                                "operator": {
                                                                                    "type": "string",
                                                                                    "const": "LESS_THAN_OR_EQUAL"
                                                                                },
                                                                                "value": {
                                                                                    "type": "string"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "field_name",
                                                                                "operator",
                                                                                "value"
                                                                            ]
                                                                        }
                                                                    ],
                                                                    "minItems": 2,
                                                                    "maxItems": 2
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "field_name": {
                                                                                    "type": "string"
                                                                                },
                                                                                "operator": {
                                                                                    "type": "string",
                                                                                    "const": "STARTS_WITH"
                                                                                },
                                                                                "value": {
                                                                                    "type": "string"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "field_name",
                                                                                "operator",
                                                                                "value"
                                                                            ]
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "field_name": {
                                                                                    "type": "string"
                                                                                },
                                                                                "operator": {
                                                                                    "type": "string",
                                                                                    "const": "EQUALS"
                                                                                },
                                                                                "value": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "field_name",
                                                                                "operator",
                                                                                "value"
                                                                            ]
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1
                                                                }
                                                            ]
                                                        },
                                                        "actions": {
                                                            "type": "array",
                                                            "prefixItems": [
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "action_type": {
                                                                            "type": "string",
                                                                            "const": "SET_FIELD"
                                                                        },
                                                                        "field_name": {
                                                                            "type": "string",
                                                                            "const": "counterparty_financial_account_id"
                                                                        },
                                                                        "value": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "action_type",
                                                                        "field_name",
                                                                        "value"
                                                                    ]
                                                                }
                                                            ],
                                                            "minItems": 1,
                                                            "maxItems": 1
                                                        }
                                                    },
                                                    "required": [
                                                        "scope",
                                                        "trigger_on_any_condition",
                                                        "conditions",
                                                        "actions"
                                                    ]
                                                },
                                                "confidence": {
                                                    "type": "string",
                                                    "enum": [
                                                        "LOW",
                                                        "MEDIUM",
                                                        "HIGH"
                                                    ]
                                                },
                                                "matches": {
                                                    "type": "object",
                                                    "properties": {
                                                        "count": {
                                                            "type": "integer",
                                                            "const": 0
                                                        },
                                                        "transaction_ids": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0
                                                        },
                                                        "lookback_days": {
                                                            "type": "integer",
                                                            "const": 365
                                                        }
                                                    },
                                                    "required": [
                                                        "count",
                                                        "transaction_ids",
                                                        "lookback_days"
                                                    ]
                                                },
                                                "unmatched_example_ids": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "rule",
                                                "confidence",
                                                "matches",
                                                "unmatched_example_ids"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rules/{ruleId}/apply": {
            "post": {
                "operationId": "rules.apply",
                "description": "Runs a `BANK`-scope rule over transactions already stored, exactly as a sync would: actions, rule logs,\ncounterparty pairing and destination updates. With `dry_run` (the default) nothing changes and the\nresponse counts what would (`would_change`), what already matches (`already_matching`) and a sample of\nids. A real run is queued and returns `202` with the application to poll; one run per rule at a time\n(`409` otherwise). Undo a run with `PUT /rule-logs/undo-bulk` over the logs at `rule_logs_url`.",
                "summary": "Apply a rule to existing transactions",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ApplyRuleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rule application queued."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleApplicationResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/RuleApplicationResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "would_change": {
                                                    "type": "integer",
                                                    "const": 0
                                                },
                                                "already_matching": {
                                                    "type": "integer",
                                                    "const": 0
                                                },
                                                "sample_transaction_ids": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0
                                                }
                                            },
                                            "required": [
                                                "would_change",
                                                "already_matching",
                                                "sample_transaction_ids"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rules/{ruleId}/applications/{applicationId}": {
            "get": {
                "operationId": "rules.applications.show",
                "description": "The state of one run started with **Apply a rule to existing transactions**; poll it until `status` is\n`COMPLETED` or `FAILED`.",
                "summary": "Get a rule application",
                "tags": [
                    "Rules"
                ],
                "parameters": [
                    {
                        "name": "ruleId",
                        "in": "path",
                        "required": true,
                        "description": "The rule ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "applicationId",
                        "in": "path",
                        "required": true,
                        "description": "The rule application ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`RuleApplicationResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/RuleApplicationResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rules/field-catalog": {
            "get": {
                "operationId": "rules.field-catalog",
                "description": "Returns the fields a rule action can set, grouped by reach, one entry per\nrule scope (`BANK`, `TRANSFER`). Each group carries the `action_type` to\nsubmit and the destinations it reaches, so the editor can render a single\ngrouped field picker and derive the action type from the chosen field \u2014\nthe user never picks an action type directly.\n\nThe catalog is static (not per-rule); render the entry matching the rule\nbeing edited. For transfer rules being attached to a bank account as\noutput rules, restrict to groups where `output_compatible` is true.",
                "summary": "Rule field catalog",
                "tags": [
                    "Rules"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rules/preview": {
            "post": {
                "operationId": "rules.preview",
                "description": "Accepts either a `rule_id` to load an existing rule, or an inline `rule`\ndefinition (conditions + actions). Provide an array of `transaction_ids`\nto test against \u2014 each transaction must belong to the authenticated user.\nNo data is persisted.\n\nAction values support **Liquid templates** for dynamic expressions.\nUse `{{ transaction.field_name }}` to reference fields and Liquid filters\n(`remove`, `regex_capture`, `date_add`, `remove_at`, `keep_at`, etc.)\nto transform values. Plain strings are treated as literal values.",
                "summary": "Preview a rule against transactions (dry-run)",
                "tags": [
                    "Rules"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PreviewRuleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "transaction_id": {
                                                        "type": "string"
                                                    },
                                                    "conditions_matched": {
                                                        "type": "boolean"
                                                    },
                                                    "transaction_summary": {
                                                        "type": "object",
                                                        "properties": {
                                                            "payee": {},
                                                            "payee_logo": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "amount": {
                                                                "type": "string"
                                                            },
                                                            "currency": {
                                                                "type": "string"
                                                            },
                                                            "date": {},
                                                            "description": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "payee",
                                                            "payee_logo",
                                                            "amount",
                                                            "currency",
                                                            "date",
                                                            "description"
                                                        ]
                                                    },
                                                    "changes": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "field": {
                                                                    "type": "string"
                                                                },
                                                                "before": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "after": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "field",
                                                                "before",
                                                                "after"
                                                            ]
                                                        }
                                                    },
                                                    "error": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "transaction_id",
                                                    "conditions_matched",
                                                    "transaction_summary",
                                                    "changes",
                                                    "error"
                                                ]
                                            }
                                        },
                                        "missing_transaction_ids": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "results",
                                        "missing_transaction_ids"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/rule-logs": {
            "get": {
                "operationId": "rule-logs.index",
                "description": "Rule logs are created any time Synci attempts to apply a rule to a bank transaction.\nEach rule log references both the rule and the bank transaction, so you can use this endpoint to get all rule logs for a specific rule or bank transaction.",
                "summary": "List all rule logs",
                "tags": [
                    "Rule Logs"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[rule_id]",
                        "in": "query",
                        "description": "Filter rule logs by the ID of the rule that was applied.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transaction_id]",
                        "in": "query",
                        "description": "Filter rule logs by the ID of the transaction the rule was applied to.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transaction_type]",
                        "in": "query",
                        "description": "Filter rule logs by the type of transaction the rule was applied to. Use `BANK` for bank transactions.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transfer_link_id]",
                        "in": "query",
                        "description": "Filter rule logs by the ID of the transfer link the rule ran on.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[rule_action_id]",
                        "in": "query",
                        "description": "Filter rule logs by the ID of the rule action that was executed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[field_name]",
                        "in": "query",
                        "description": "Filter rule logs by the name of the transaction field that was changed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[success]",
                        "in": "query",
                        "description": "Whether the rule action was successful.",
                        "schema": {
                            "type": "boolean",
                            "examples": [
                                true
                            ]
                        }
                    },
                    {
                        "name": "filter[undone_log_id]",
                        "in": "query",
                        "description": "Filter for undo entries by the ID of the original rule log they reverted.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[rule_application_id]",
                        "in": "query",
                        "description": "Filter rule logs by the retroactive rule application that wrote them (see **Apply a rule to existing transactions**).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for rule logs by commonly populated fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "undone_at",
                                    "-undone_at",
                                    "transaction_id",
                                    "-transaction_id",
                                    "transfer_link_id",
                                    "-transfer_link_id",
                                    "rule_id",
                                    "-rule_id",
                                    "rule_action_id",
                                    "-rule_action_id",
                                    "undone_log_id",
                                    "-undone_log_id",
                                    "executed_at",
                                    "-executed_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "rule",
                                    "rule_action"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `RuleLogResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/RuleLogResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rule-logs/{logId}": {
            "get": {
                "operationId": "rule-logs.show",
                "summary": "Get rule log",
                "tags": [
                    "Rule Logs"
                ],
                "parameters": [
                    {
                        "name": "logId",
                        "in": "path",
                        "required": true,
                        "description": "The rule log ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`RuleLogResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/RuleLogResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/rule-logs/undo-bulk": {
            "put": {
                "operationId": "rule-logs.undo-bulk",
                "description": "Reverts multiple rule actions by restoring the fields' previous values.\nCreates new log entries to track the reversals. Works with the following action types:\n- `SET_FIELD`\n- `SET_YNAB_FIELD`\n- `SET_LUNCH_MONEY_FIELD`",
                "summary": "Undo multiple rule actions",
                "tags": [
                    "Rule Logs"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkUndoRuleLogsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Bulk undo completed."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "rule_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "Failed to undo transaction.",
                                                                            "Rule action undone.",
                                                                            "The action has been undone too many times.",
                                                                            "This action cannot be undone.",
                                                                            "Cannot undo this action as more recent modifications exist.",
                                                                            "This action has already been undone."
                                                                        ]
                                                                    },
                                                                    "data": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "rule_log": {
                                                                                        "$ref": "#/components/schemas/RuleLogResource"
                                                                                    },
                                                                                    "transaction": {
                                                                                        "$ref": "#/components/schemas/TransactionResource"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "rule_log",
                                                                                    "transaction"
                                                                                ]
                                                                            },
                                                                            {
                                                                                "type": "null"
                                                                            }
                                                                        ]
                                                                    },
                                                                    "error": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "null"
                                                                            },
                                                                            {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                    "Unknown error"
                                                                                ]
                                                                            }
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "rule_log_id",
                                                                    "success",
                                                                    "message",
                                                                    "data",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "rule_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Failed to undo rule action."
                                                                    },
                                                                    "error": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "rule_log_id",
                                                                    "success",
                                                                    "message",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "rule_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Rule log not found or does not belong to the user."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "rule_log_id",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "results"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/rule-logs/{logId}/undo": {
            "put": {
                "operationId": "rule-logs.undo",
                "description": "Reverts a specific rule action by restoring the field's previous value.\nCreates a new log entry to track the reversal. Works with the following action types:\n- `SET_FIELD`\n- `SET_YNAB_FIELD`\n- `SET_LUNCH_MONEY_FIELD`",
                "summary": "Undo a rule action",
                "tags": [
                    "Rule Logs"
                ],
                "parameters": [
                    {
                        "name": "logId",
                        "in": "path",
                        "required": true,
                        "description": "The rule log ID to undo",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Failed to undo transaction.",
                                                "Rule action undone.",
                                                "The action has been undone too many times.",
                                                "This action cannot be undone.",
                                                "Cannot undo this action as more recent modifications exist.",
                                                "This action has already been undone."
                                            ]
                                        },
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "rule_log": {
                                                            "$ref": "#/components/schemas/RuleLogResource"
                                                        },
                                                        "transaction": {
                                                            "$ref": "#/components/schemas/TransactionResource"
                                                        }
                                                    },
                                                    "required": [
                                                        "rule_log",
                                                        "transaction"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Failed to undo transaction.",
                                                "Rule action undone.",
                                                "The action has been undone too many times.",
                                                "This action cannot be undone.",
                                                "Cannot undo this action as more recent modifications exist.",
                                                "This action has already been undone."
                                            ]
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "enum": [
                                                                "Unknown error"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "error"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/transfer-links": {
            "get": {
                "operationId": "transfer-links.index",
                "description": "Transfer links are used to transfer transactions from a financial account to a destination.\nOnce a transfer link is created, Synci will automatically transfer bank transactions to the destination according to the link's configuration.\nFinancial accounts and destinations can have multiple transfer links.",
                "summary": "List all transfer links",
                "tags": [
                    "Transfer Links"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[financial_account_id]",
                        "in": "query",
                        "description": "Filter transfer links by the ID of the financial account transactions are transferred from.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[destination_id]",
                        "in": "query",
                        "description": "Filter transfer links by the ID of the destination transactions are transferred to.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[active]",
                        "in": "query",
                        "description": "Filter transfer links by whether they are enabled.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[destination_type]",
                        "in": "query",
                        "description": "Filter transfer links by destination type, for example `YNAB`, `LUNCH_MONEY`, or `GOOGLE_SHEETS`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for transfer links by commonly populated fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "rules",
                                    "destination",
                                    "destination.parent",
                                    "financial_account",
                                    "financial_account.financial_connection",
                                    "financial_account.financial_connection.institution"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `TransferLinkResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TransferLinkResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "transfer-links.store",
                "description": "Transfer links are used to transfer transactions from a financial account to a destination.\nOnce a transfer link is created, Synci will automatically transfer bank transactions to the destination according to the link's configuration.\nFinancial accounts and destinations can have multiple transfer links.",
                "summary": "Create a new transfer link",
                "tags": [
                    "Transfer Links"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTransferLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Transfer link created."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransferLinkResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_account"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/transfer-links/{transferLinkId}": {
            "get": {
                "operationId": "transfer-links.show",
                "summary": "Get transfer link",
                "tags": [
                    "Transfer Links"
                ],
                "parameters": [
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`TransferLinkResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransferLinkResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_account",
                                                        "rules"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "transfer-links.update",
                "summary": "Update transfer link",
                "tags": [
                    "Transfer Links"
                ],
                "parameters": [
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateTransferLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Transfer link updated."
                                        },
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransferLinkResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "financial_account",
                                                        "rules"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "transfer-links.destroy",
                "description": "Once a transfer link is deleted, Synci will no longer automatically transfer bank transactions to the destination.",
                "summary": "Delete transfer link",
                "tags": [
                    "Transfer Links"
                ],
                "parameters": [
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/transfer-links/retry-transfers": {
            "post": {
                "operationId": "transfer-links.retry-transfers",
                "description": "This endpoint allows you to retry failed transfers for all transfer links associated with your account.\nTransfers are processed asynchronously. Each transaction can be retried at most once per minute per transfer link,\nand transactions that have failed 10 or more times on a transfer link are skipped.",
                "summary": "Retry transfers for all transfer links",
                "tags": [
                    "Transfer Links"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RetryTransfersAllLinksRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/transfer-links/{transferLinkId}/retry-transfers": {
            "post": {
                "operationId": "transfer-links.retry-transfers.for-link",
                "description": "This endpoint allows you to retry failed transfers for a specific transfer link.\nTransfers are processed asynchronously. Each transaction can be retried at most once per minute,\nand transactions that have failed 10 or more times on the transfer link are skipped.",
                "summary": "Retry transfers for a specific transfer link",
                "tags": [
                    "Transfer Links"
                ],
                "parameters": [
                    {
                        "name": "transferLinkId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer link ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RetryTransfersRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Transfers scheduled for retry."
                                                },
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "transfer_link_id": {
                                                            "type": "string"
                                                        },
                                                        "transaction_ids": {
                                                            "type": "string"
                                                        },
                                                        "blocked_transaction_ids": {
                                                            "type": "string"
                                                        },
                                                        "throttled_transaction_ids": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "transfer_link_id",
                                                        "transaction_ids",
                                                        "blocked_transaction_ids",
                                                        "throttled_transaction_ids"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Failed to retry transfers."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "error"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/transfer-logs": {
            "get": {
                "operationId": "transfer-logs.index",
                "description": "Transfer logs are created any time Synci attempts to transfer a bank transaction.\nSince destinations and financial accounts can have multiple transfer links, transfer logs are created for each transfer link.\nYou should use transfer logs to track the status of a transaction. For example, by getting the latest transfer log for a transaction and transfer link, you can see if the transfer was successful or not.",
                "summary": "List all transfer logs",
                "tags": [
                    "Transfer Logs"
                ],
                "parameters": [
                    {
                        "name": "page[size]",
                        "in": "query",
                        "description": "The number of results that will be returned per page.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "page[number]",
                        "in": "query",
                        "description": "The page number to start the pagination from.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[transfer_link_id]",
                        "in": "query",
                        "description": "Filter transfer logs by the ID of the transfer link the transaction was transferred through.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transaction_id]",
                        "in": "query",
                        "description": "Filter transfer logs by the ID of the transaction that was transferred.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[destination_transaction_id]",
                        "in": "query",
                        "description": "Filter transfer logs by the ID the destination assigned to the transferred transaction.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[status]",
                        "in": "query",
                        "description": "Filter transfer logs by status, for example `TRANSFERRED` or `FAILED`.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[transaction_ids]",
                        "in": "query",
                        "description": "Filter transfer logs by one or more transaction IDs, separated by commas.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "filter[search]",
                        "in": "query",
                        "description": "Search for transfer logs by commonly populated fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "default": [
                                "-id"
                            ],
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "-id",
                                    "created_at",
                                    "-created_at",
                                    "updated_at",
                                    "-updated_at",
                                    "transfer_link_id",
                                    "-transfer_link_id",
                                    "status",
                                    "-status",
                                    "transaction_id",
                                    "-transaction_id",
                                    "destination_transaction_id",
                                    "-destination_transaction_id"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "transfer_link",
                                    "transaction"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `TransferLogResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TransferLogResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/transfer-logs/{transferLogId}": {
            "get": {
                "operationId": "transfer-logs.show",
                "summary": "Get transfer log",
                "tags": [
                    "Transfer Logs"
                ],
                "parameters": [
                    {
                        "name": "transferLogId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer log ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`TransferLogResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransferLogResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "transfer_link",
                                                        "transaction"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/transfer-logs/{transferLogId}/undo": {
            "put": {
                "operationId": "transfer-logs.undo",
                "description": "Deletes the transaction from the destination it was transferred to.\nCreates a new transfer log entry to track the undo action.",
                "summary": "Undo a transfer",
                "tags": [
                    "Transfer Logs"
                ],
                "parameters": [
                    {
                        "name": "transferLogId",
                        "in": "path",
                        "required": true,
                        "description": "The transfer log ID to undo",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "enum": [
                                                "Failed to undo transfer.",
                                                "Transfer undone successfully.",
                                                "This transfer cannot be undone."
                                            ]
                                        },
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "transfer_log": {
                                                            "$ref": "#/components/schemas/TransferLogResource"
                                                        }
                                                    },
                                                    "required": [
                                                        "transfer_log"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    }
                }
            }
        },
        "/transfer-logs/undo-bulk": {
            "put": {
                "operationId": "transfer-logs.undo-bulk",
                "description": "Deletes the transactions from the destinations they were transferred to.\nCreates new transfer log entries to track the undo actions.",
                "summary": "Undo multiple transfers",
                "tags": [
                    "Transfer Logs"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BulkUndoTransferLogsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Bulk undo completed."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transfer_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "Failed to undo transfer.",
                                                                            "Transfer undone successfully.",
                                                                            "This transfer cannot be undone."
                                                                        ]
                                                                    },
                                                                    "data": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "transfer_log": {
                                                                                        "$ref": "#/components/schemas/TransferLogResource"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "transfer_log"
                                                                                ]
                                                                            },
                                                                            {
                                                                                "type": "null"
                                                                            }
                                                                        ]
                                                                    },
                                                                    "error": {
                                                                        "anyOf": [
                                                                            {
                                                                                "type": "string"
                                                                            },
                                                                            {
                                                                                "type": "null"
                                                                            },
                                                                            {
                                                                                "type": "string",
                                                                                "enum": [
                                                                                    "Unknown error",
                                                                                    "The page could not be found in Notion.",
                                                                                    "The row could not be found in the spreadsheet.",
                                                                                    "This transfer has already been undone.",
                                                                                    "This transfer is already being undone.",
                                                                                    "The transfer link or destination account this transaction was sent to no longer exists."
                                                                                ]
                                                                            }
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transfer_log_id",
                                                                    "success",
                                                                    "message",
                                                                    "data",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transfer_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Failed to undo transfer."
                                                                    },
                                                                    "error": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transfer_log_id",
                                                                    "success",
                                                                    "message",
                                                                    "error"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "transfer_log_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "success": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "message": {
                                                                        "type": "string",
                                                                        "const": "Transfer log not found or does not belong to the user."
                                                                    }
                                                                },
                                                                "required": [
                                                                    "transfer_log_id",
                                                                    "success",
                                                                    "message"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "results"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#/components/responses/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "oauth2": {
                "type": "oauth2",
                "flows": {
                    "authorizationCode": {
                        "authorizationUrl": "https://api.synci.io/oauth/authorize",
                        "tokenUrl": "https://api.synci.io/oauth/token",
                        "scopes": {
                            "profile:read": "View your name, email, and profile details",
                            "accounts:read": "View your connected financial accounts and balances",
                            "accounts:write": "Update, sync, and remove your financial accounts, and change their settings",
                            "transactions:read": "View your transactions",
                            "transactions:write": "Create, update, and delete your transactions",
                            "sensitive:read": "See sensitive identifiers like account numbers and account holder names",
                            "transfer-links:read": "View your transfer links and their transfer history",
                            "transfer-links:write": "Create, update, and delete transfer links, and undo transfers",
                            "rules:read": "View your rules and rule activity",
                            "rules:write": "Create, update, and delete rules, and undo rule actions",
                            "webhooks:read": "View your webhook endpoints",
                            "webhooks:write": "Create, update, and delete webhook endpoints, and rotate their secrets",
                            "destinations:read": "View your connected destinations",
                            "destinations:write": "Connect, update, and remove destinations",
                            "financial-connections:read": "View your connected institutions",
                            "financial-connections:write": "Manage your connected institutions"
                        }
                    }
                }
            },
            "http": {
                "type": "http",
                "description": "Bearer token (personal access token or OAuth access token)",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "AccountHoldingResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string"
                    },
                    "symbol": {
                        "type": "string",
                        "description": "Ticker / asset symbol (e.g. BTC, AAPL)."
                    },
                    "description": {
                        "type": "string",
                        "description": "Friendly description, when the provider surfaces one."
                    },
                    "asset_class": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Asset class \u2014 one of STOCK | ETF | OPTION | CRYPTOCURRENCY |\nFIXED_INCOME | MUTUAL_FUND | OTHER."
                    },
                    "quantity": {
                        "type": "string",
                        "description": "Quantity held. Serialized as a decimal-precision string (8 dp)."
                    },
                    "average_purchase_price": {
                        "type": "string",
                        "description": "Cost basis where the provider exposes one. Null otherwise."
                    },
                    "last_price": {
                        "type": "string",
                        "description": "Latest market price for the symbol, in `currency`."
                    },
                    "market_value": {
                        "type": "string",
                        "description": "last_price \u00d7 quantity, denominated in `currency`."
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code that prices/values are denominated in."
                    },
                    "integrator": {
                        "type": "string",
                        "description": "Source provider \u2014 currently always `SNAPTRADE`."
                    },
                    "synced_at": {
                        "type": "string",
                        "description": "When this holding snapshot was last refreshed."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "symbol",
                    "description",
                    "asset_class",
                    "quantity",
                    "average_purchase_price",
                    "last_price",
                    "market_value",
                    "currency",
                    "integrator",
                    "synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "AccountHoldingResource"
            },
            "ApplyRuleRequest": {
                "type": "object",
                "properties": {
                    "dry_run": {
                        "type": "boolean",
                        "description": "When true (the default) nothing is changed: the response counts what a real run would change."
                    },
                    "booking_date_after": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Only consider transactions booked on or after this date. Default: no limit."
                    },
                    "financial_account_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Restrict the run to these accounts. Default: every account the rule is attached to. Each must be attached to the rule.",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "title": "ApplyRuleRequest"
            },
            "AttachRuleToFinancialAccountRequest": {
                "type": "object",
                "properties": {
                    "order": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Single rule ordering - used when only attaching one rule",
                        "minimum": 0,
                        "maximum": 999
                    },
                    "order_list": {
                        "type": "array",
                        "description": "Full reordering - used when the client wants to provide the complete ordered list",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "title": "AttachRuleToFinancialAccountRequest"
            },
            "AttachRuleToTransferLinkRequest": {
                "type": "object",
                "properties": {
                    "order": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Single rule ordering - used when only attaching one rule",
                        "minimum": 0,
                        "maximum": 999
                    },
                    "order_list": {
                        "type": "array",
                        "description": "Full reordering - used when the client wants to provide the complete ordered list",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "title": "AttachRuleToTransferLinkRequest"
            },
            "BankDataTypeEnum": {
                "type": "string",
                "enum": [
                    "ALL",
                    "TRANSACTIONS",
                    "BALANCES",
                    "DETAILS"
                ],
                "title": "BankDataTypeEnum"
            },
            "BulkDeleteFinancialAccountsRequest": {
                "type": "object",
                "properties": {
                    "accountIds": {
                        "type": "array",
                        "description": "The IDs of the financial accounts to delete. Only accounts belonging to the authenticated user will be deleted.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1,
                        "maxItems": 100
                    }
                },
                "required": [
                    "accountIds"
                ],
                "title": "BulkDeleteFinancialAccountsRequest"
            },
            "BulkDeleteTransactionsRequest": {
                "type": "object",
                "properties": {
                    "transactionIds": {
                        "type": "array",
                        "description": "The IDs of the transactions to delete. Only transactions belonging to the authenticated user will be deleted.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "transactionIds"
                ],
                "title": "BulkDeleteTransactionsRequest"
            },
            "BulkUndoRuleLogsRequest": {
                "type": "object",
                "properties": {
                    "ruleLogIds": {
                        "type": "array",
                        "description": "The IDs of the rule logs to undo.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "ruleLogIds"
                ],
                "title": "BulkUndoRuleLogsRequest"
            },
            "BulkUndoTransferLogsRequest": {
                "type": "object",
                "properties": {
                    "transferLogIds": {
                        "type": "array",
                        "description": "The IDs of the transfer logs to undo.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "transferLogIds"
                ],
                "title": "BulkUndoTransferLogsRequest"
            },
            "CommitImportBatchRequest": {
                "type": "object",
                "properties": {
                    "save_mapping_as_default": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "CSV only: make this batch's mapping the account's saved mapping, applied to its next CSV without a proposal."
                    }
                },
                "title": "CommitImportBatchRequest"
            },
            "CreateFinancialConnectionRequest": {
                "type": "object",
                "properties": {
                    "institution_id": {
                        "type": "integer",
                        "description": "The ID of the institution you want to establish a connection with. You can find available institutions under the institutions endpoint (GET /finance/institutions)."
                    },
                    "max_historical_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The maximum number of days of historical data Synci should be able to fetch. Applies to all accounts belonging to this connection. Use the institutions endpoint (GET /finance/institutions) to find out the maximum historical days for an institution.",
                        "minimum": 0
                    },
                    "access_valid_for_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Also known as consent lifetime. The number of days Synci should be able to access accounts belonging to this connection.\nE.g. if this is set to 180 days, you will have to re-authenticate the connection every 180 days.\nSynci will email you when the expiry date is approaching. Use the institutions endpoint (GET /finance/institutions) to find out the maximum access valid for days for an institution.",
                        "minimum": 1
                    },
                    "sync_balances": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "integrator": {
                        "$ref": "#/components/schemas/IntegratorEnum"
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional correlation id stored on the connection \u2014 e.g. your own\nend-user id. Filter connections later with ?filter[reference]=.",
                        "maxLength": 255
                    }
                },
                "required": [
                    "institution_id"
                ],
                "title": "CreateFinancialConnectionRequest"
            },
            "CreateGoogleSheetTabRequest": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Title of the new worksheet (tab).",
                        "maxLength": 255
                    },
                    "purpose": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optionally assign the new tab to one of the sheet's sync slots:\ntransactions, current balances, or balance history.",
                        "enum": [
                            "transactions",
                            "live_balance",
                            "balance_history",
                            null
                        ]
                    }
                },
                "required": [
                    "title"
                ],
                "title": "CreateGoogleSheetTabRequest"
            },
            "CreateGoogleSheetsConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional display name for the connection.",
                        "maxLength": 255
                    }
                },
                "title": "CreateGoogleSheetsConnectionRequest"
            },
            "CreateLoanCheckpointRequest": {
                "type": "object",
                "properties": {
                    "balance": {
                        "type": "number",
                        "description": "The balance as the bank shows it on the reference date: the amount owed, entered positive.",
                        "minimum": 0
                    },
                    "reference_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date the balance was true. Defaults to today; never in the future."
                    }
                },
                "required": [
                    "balance"
                ],
                "title": "CreateLoanCheckpointRequest"
            },
            "CreateLoanRatePeriodRequest": {
                "type": "object",
                "properties": {
                    "effective_from": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The first day the new rate applies. On or after the last accrual date: rates only change going forward."
                    },
                    "annual_rate": {
                        "type": "number",
                        "description": "Annual interest rate in percent, 0 to 100.",
                        "minimum": 0,
                        "maximum": 100
                    }
                },
                "required": [
                    "effective_from",
                    "annual_rate"
                ],
                "title": "CreateLoanRatePeriodRequest"
            },
            "CreateLunchMoneyAccountRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The account name.",
                        "minLength": 1,
                        "maxLength": 45
                    },
                    "type": {
                        "description": "The Lunch Money account type.",
                        "$ref": "#/components/schemas/LunchMoneyAccountTypeEnum"
                    },
                    "subtype": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Free-text subtype, for example \"checking\" or \"savings\".",
                        "minLength": 1,
                        "maxLength": 25
                    },
                    "currency": {
                        "type": "string",
                        "description": "Three-letter ISO 4217 currency code, lowercase.",
                        "pattern": "^[a-z]{3}$"
                    },
                    "balance": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Starting balance in currency units, negative when money is owed.\nSynci converts it to Lunch Money's sign convention. Defaults to 0.",
                        "minimum": -999999999999,
                        "maximum": 999999999999
                    },
                    "institution_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Name of the institution holding the account.",
                        "minLength": 1,
                        "maxLength": 50
                    }
                },
                "required": [
                    "name",
                    "type",
                    "currency"
                ],
                "title": "CreateLunchMoneyAccountRequest"
            },
            "CreateLunchMoneyConnectionRequest": {
                "type": "object",
                "properties": {
                    "access_token": {
                        "type": "string",
                        "description": "Your Lunch Money API access token, created in the Lunch Money\ndeveloper settings."
                    }
                },
                "required": [
                    "access_token"
                ],
                "title": "CreateLunchMoneyConnectionRequest"
            },
            "CreateManualBalanceCheckpointRequest": {
                "type": "object",
                "properties": {
                    "balance": {
                        "type": "number",
                        "description": "The balance as the bank shows it at the end of the reference date, signed: a card's debt is negative."
                    },
                    "reference_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date the balance was true. Defaults to today; never in the future."
                    }
                },
                "required": [
                    "balance"
                ],
                "title": "CreateManualBalanceCheckpointRequest"
            },
            "CreateManualFinancialAccountRequest": {
                "type": "object",
                "properties": {
                    "account_category": {
                        "type": "string",
                        "description": "The kind of manual account: `LOAN` (modelled from its terms) or `BANK` (a checking, savings or card account filled from statement files).",
                        "enum": [
                            "LOAN",
                            "BANK"
                        ]
                    },
                    "cash_account_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "BANK only: `CACC` (checking), `SVGS` (savings) or `CARD` (card).",
                        "enum": [
                            "CACC",
                            "SVGS",
                            "CARD",
                            null
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the account as the user wants to see it.",
                        "maxLength": 100
                    },
                    "institution_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The lender, as the user wants it shown (\"L\u00e5nekassen\"). Groups manual accounts in the dashboard; blank clears it.",
                        "maxLength": 100
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code.",
                        "pattern": "^[A-Za-z]{3}$",
                        "minLength": 3,
                        "maxLength": 3
                    },
                    "balance": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Today's balance as the bank shows it. LOAN: the amount owed, entered positive and stored negative. BANK: signed (a card's debt is negative), or null when unknown until the first import or checkpoint.",
                        "minimum": 0
                    },
                    "balance_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date that balance was true. Defaults to today; never in the future. Needs a balance."
                    },
                    "loan": {
                        "type": "object",
                        "description": "The loan terms. Required for a LOAN account, not accepted on a BANK account.",
                        "properties": {
                            "kind": {
                                "description": "MORTGAGE, STUDENT, AUTO, PERSONAL or OTHER.",
                                "$ref": "#/components/schemas/LoanKindEnum"
                            },
                            "repayment_type": {
                                "anyOf": [
                                    {
                                        "description": "ANNUITY (default), SERIAL or INTEREST_ONLY.",
                                        "$ref": "#/components/schemas/LoanRepaymentTypeEnum"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "annual_rate": {
                                "type": "number",
                                "description": "Annual interest rate in percent, 0 to 100.",
                                "minimum": 0,
                                "maximum": 100
                            },
                            "fee_per_payment": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "description": "Fixed fee charged with every regular payment. Defaults to 0.",
                                "minimum": 0
                            },
                            "day_count": {
                                "anyOf": [
                                    {
                                        "description": "ACT_365 (default), ACT_360 or THIRTY_360.",
                                        "$ref": "#/components/schemas/LoanDayCountEnum"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "original_amount": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "description": "The amount originally borrowed. Display only.",
                                "minimum": 0
                            },
                            "start_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "When the loan started. Display only."
                            },
                            "term_months": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The agreed term in months. Display only.",
                                "minimum": 1,
                                "maximum": 600
                            },
                            "paying_financial_account_id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The caller's own bank account that pays the loan. Mutually exclusive with `loan.schedule`."
                            },
                            "schedule": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "description": "Schedule mode, when no connected account pays the loan: the amount and day of month to post.",
                                "properties": {
                                    "amount": {
                                        "type": "number"
                                    },
                                    "day_of_month": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 31
                                    }
                                }
                            }
                        }
                    }
                },
                "required": [
                    "account_category",
                    "name",
                    "currency"
                ],
                "title": "CreateManualFinancialAccountRequest"
            },
            "CreateNotionConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional display name for the connection.",
                        "maxLength": 255
                    }
                },
                "title": "CreateNotionConnectionRequest"
            },
            "CreateRuleRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The name of the rule.",
                        "maxLength": 64
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An optional description of what the rule does.",
                        "maxLength": 192
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the rule is active. Disabled rules are not applied."
                    },
                    "trigger_on_any_condition": {
                        "type": "boolean",
                        "description": "When enabled, only one condition must match for the rule to be applied."
                    },
                    "skip_other_rules_when_triggered": {
                        "type": "boolean",
                        "description": "If the rule's conditions are met, stop processing other rules attached to the same financial account or transfer link."
                    },
                    "scope": {
                        "description": "Where the rule runs:\n- **BANK**: applied to transactions as they are stored in Synci (changes are permanent). Can only be attached to financial accounts.\n- **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.",
                        "$ref": "#/components/schemas/RuleScopeEnum"
                    },
                    "type": {
                        "description": "The legacy rule type (**BANK**, **YNAB_TRANSFER_LINK**, **LUNCH_MONEY_TRANSFER_LINK**, **GOOGLE_SHEETS_TRANSFER_LINK`**).\nDeprecated: send `scope` instead. When both are provided they must agree.\n\n| |\n|---|\n| `BANK` <br/> Applied to bank transactions as they are fetched. Attaches to financial accounts. |\n| `YNAB_TRANSFER_LINK` <br/> Applied while transferring transactions to a YNAB budget account. |\n| `LUNCH_MONEY_TRANSFER_LINK` <br/> Applied while transferring transactions to a Lunch Money account. |\n| `GOOGLE_SHEETS_TRANSFER_LINK` <br/> Applied while transferring transactions to a Google Sheet. |\n| `NOTION_TRANSFER_LINK` <br/> Applied while transferring transactions to a Notion database. |",
                        "$ref": "#/components/schemas/RuleTypeEnum"
                    },
                    "conditions": {
                        "type": "array",
                        "description": "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.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "field_name": {
                                    "type": "string"
                                },
                                "operator": {
                                    "$ref": "#/components/schemas/RuleOperatorEnum"
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "transaction_type": {
                                    "anyOf": [
                                        {
                                            "description": "Which copy of the transaction the condition reads. Defaults to `BANK`.",
                                            "$ref": "#/components/schemas/TransactionTypeEnum"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            },
                            "required": [
                                "field_name",
                                "operator"
                            ]
                        }
                    },
                    "actions": {
                        "type": "array",
                        "description": "The actions to execute when the rule's conditions are met. Every rule must have at least one action.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 999
                                },
                                "action_type": {
                                    "$ref": "#/components/schemas/RuleActionTypeEnum"
                                },
                                "field_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "action_type"
                            ]
                        }
                    },
                    "financial_accounts": {
                        "type": "array",
                        "description": "The financial accounts to attach the rule to, each with an `id` and an `order`. Only allowed for `BANK` rules.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "order": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                }
                            }
                        }
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "The transfer links to attach the rule to, each with an `id` and an `order`. Only allowed for transfer link rule types.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "order": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                }
                            }
                        }
                    },
                    "institutions": {
                        "type": "array",
                        "description": "Reserved for Synci administrators.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "banks": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "Reserved for Synci administrators."
                                },
                                "order": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                }
                            }
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "CreateRuleRequest"
            },
            "CreateTransactionRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": "integer",
                        "description": "The ID of the financial account this transaction belongs to."
                    },
                    "amount": {
                        "type": "number",
                        "description": "The amount of the transaction as billed to the account."
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code.",
                        "pattern": "^[A-Z]{3}$",
                        "minLength": 3,
                        "maxLength": 3
                    },
                    "booking_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The date when an entry is posted to an account on the financial institutions books. **Booking date is required if value date is not provided.**"
                    },
                    "booking_datetime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date and time when an entry is posted to an account on the financial institutions books."
                    },
                    "value_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The date at which assets become available to the account owner in case of a credit. **Value date is required if booking date is not provided.**"
                    },
                    "value_datetime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date and time at which assets become available to the account owner in case of a credit."
                    },
                    "booked": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the transaction is booked (cleared) or not. If false, the transaction is pending."
                    },
                    "debtor": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the debtor if a \"Credited\" transaction."
                            },
                            "bban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "iban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "masked_pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "msisdn": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agent": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "creditor": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the creditor if a \"Debited\" transaction."
                            },
                            "bban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "iban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of creditor, e.g. a SEPA Creditor ID."
                            },
                            "pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "masked_pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "msisdn": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agent": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "ultimate_debtor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ultimate_creditor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "remittance_information": {
                        "type": "object",
                        "properties": {
                            "structured": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Reference as contained in the structured remittance reference structure."
                            },
                            "structured_array": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "description": "Array of reference as contained in the structured remittance reference structure.",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "unstructured": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "unstructured_array": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "additional_data_structured": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An umbrella datapoint used for information that is outside of Berlin Group specification, such as bank- or country-specific fields."
                    },
                    "additional_information": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Might be used by the financial institution to transport additional transaction related information."
                    },
                    "additional_information_structured": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "balance_after_transaction": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "The account balance after this transaction. Recommended balance type is INTERIM_BOOKED."
                    },
                    "codes": {
                        "type": "object",
                        "properties": {
                            "bank_transaction_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Institution transaction code as used by the financial institution and using the sub elements of this structured code defined by ISO20022. For standing order reports the following codes are applicable: \"PMNT-ICDT-STDO\" for credit transfers, \"PMNT-IRCT-STDO\" for instant credit transfers, \"PMNT-ICDT-XBST\" for cross-border credit transfers, \"PMNT-IRCT-XBST\" for cross-border real time credit transfers, \"PMNT-MCOP-OTHR\" for specific standing orders which have a dynamical amount to move left funds e.g. on month end to a saving account."
                            },
                            "merchant_category_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Merchant category code as defined by card issuer."
                            },
                            "proprietary_bank_transaction_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Proprietary bank transaction code as used within a community or within a financial institution."
                            },
                            "purpose_code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "currency_exchange": {
                        "type": "object",
                        "properties": {
                            "source_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "exchange_rate": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "unit_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "target_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "quotation_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "contract_identification": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "external_identifiers": {
                        "type": "object",
                        "properties": {
                            "integrator_transaction_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Transaction identifier given by the bank integrator."
                            },
                            "institution_transaction_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Transaction identifier provided by the bank/financial institution."
                            },
                            "end_to_end_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Unique end to end ID."
                            },
                            "entry_reference": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The identification of the transaction as used for reference given by the financial institution."
                            },
                            "check_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of a cheque."
                            },
                            "mandate_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of mandates, e.g. a SEPA Mandate ID."
                            }
                        }
                    }
                },
                "required": [
                    "financial_account_id",
                    "amount",
                    "currency"
                ],
                "title": "CreateTransactionRequest"
            },
            "CreateTransferLinkRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": "integer",
                        "description": "The ID of the financial account transactions are being transferred from."
                    },
                    "destination_type": {
                        "description": "The type of destination the transfer link sends transactions to:\n- **YNAB**: a YNAB budget account.\n- **LUNCH_MONEY**: a Lunch Money account.\n- **GOOGLE_SHEETS**: a Google Sheet.",
                        "$ref": "#/components/schemas/DestinationTypeEnum"
                    },
                    "destination_id": {
                        "type": "integer",
                        "description": "The ID of the destination transactions should be transferred to. The type of resource the ID refers to depends on the destination type:\n- **YNAB**: the ID of a YNAB budget account.\n- **LUNCH_MONEY**: the ID of a Lunch Money account.\n- **GOOGLE_SHEETS**: the ID of a Google Sheet."
                    },
                    "transfer_start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date from which the transfer link will start transferring transactions.\nIf not provided, all available transactions in the attached financial account will be transferred regardless of their date.",
                        "examples": [
                            "2025-01-01"
                        ]
                    },
                    "on_booked_change": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Which destination fields to update when a transaction's booked status changes.\nIf not provided, all fields will be updated.",
                        "properties": {
                            "update_status": {
                                "type": "boolean"
                            },
                            "update_payee": {
                                "type": "boolean"
                            },
                            "update_description": {
                                "type": "boolean"
                            },
                            "update_amount": {
                                "type": "boolean"
                            }
                        }
                    },
                    "active": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the transfer link is active."
                    },
                    "sync_mode": {
                        "anyOf": [
                            {
                                "description": "Which streams to push to the destination:\n- `transactions`: only individual transactions (default for bank sources)\n- `balance`: only periodic balance snapshots\n- `transactions_and_balance`: both (default for brokerage / crypto sources)\n\n| |\n|---|\n| `TRANSACTIONS` <br/> Push individual transactions only. |\n| `BALANCE` <br/> Push periodic balance snapshots only. |\n| `TRANSACTIONS_AND_BALANCE` <br/> Push both transactions and balance snapshots. |",
                                "$ref": "#/components/schemas/TransferLinkSyncModeEnum"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "financial_account_id",
                    "destination_type"
                ],
                "title": "CreateTransferLinkRequest"
            },
            "CreateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "The HTTPS URL that will receive event deliveries.",
                        "maxLength": 512
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional label to help you identify the endpoint.",
                        "maxLength": 255
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the endpoint receives deliveries. Defaults to true."
                    },
                    "events": {
                        "type": "array",
                        "description": "The event types this endpoint should receive. Canonical names:\n`transactions.created`, `transactions.updated`, `balance.updated`,\n`holdings.updated`, `account.created`, `account.updated`,\n`account.deleted`. Legacy aliases (`bank_account.created`,\n`bank_account.updated`, `bank_account.deleted`) are accepted but\ncannot be mixed in the same array with their canonical counterparts.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "transactions.created",
                                "transactions.updated",
                                "balance.updated",
                                "holdings.updated",
                                "account.created",
                                "account.updated",
                                "account.deleted",
                                "account.backfill.completed",
                                "bank_account.created",
                                "bank_account.updated",
                                "bank_account.deleted",
                                "connection.created",
                                "connection.activated",
                                "connection.reauthorized",
                                "connection.expiring",
                                "connection.expired",
                                "connection.failing",
                                "connection.recovered",
                                "connection.disabled",
                                "connection.deleted",
                                "connection.backfill.completed"
                            ]
                        },
                        "minItems": 1
                    },
                    "financial_accounts": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Limit deliveries to these financial account IDs. Omit or pass\nnull to receive events for every account your token can access.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "type": {
                        "description": "`WEBHOOK` (default) for a standard endpoint, `ZAPIER` for an\nendpoint used with the Zapier integration, or `N8N` for an\nendpoint registered by the Synci n8n trigger node.",
                        "$ref": "#/components/schemas/WebhookTypeEnum"
                    },
                    "payload_version": {
                        "description": "Shape of payloads delivered to this endpoint. Defaults to `v2`\n(canonical `account.*` event names + `financial_account` payload key).\nPass `v1` to opt into the legacy shape (`bank_account.*` event-type\naliases + `bank_account` payload key) \u2014 only useful for clients\nmigrating an existing integration. Pinned at creation;\nupdates are ignored. If omitted, the version is inferred from the `events` array: any\n`bank_account.*` subscription implies `v1`, otherwise `v2`.",
                        "$ref": "#/components/schemas/WebhookEndpointPayloadVersion"
                    },
                    "omit_sensitive_identifiers": {
                        "description": "When true, sensitive account identifiers (IBAN/BBAN) are omitted\nfrom delivered payloads, and IBANs written into transaction text\nare replaced with `[hidden: account number]`. Must be true for\nZapier endpoints.",
                        "enum": [
                            "yes",
                            "on",
                            "1",
                            1,
                            "true",
                            true
                        ]
                    }
                },
                "required": [
                    "url"
                ],
                "title": "CreateWebhookEndpointRequest"
            },
            "CreateYnabBudgetAccountRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The account name. YNAB requires it to be unique within the budget.",
                        "minLength": 1,
                        "maxLength": 50
                    },
                    "type": {
                        "type": "string",
                        "description": "YNAB's API can create these six types. Other synced account types\n(including loans and lines of credit) must be created in YNAB.",
                        "enum": [
                            "checking",
                            "savings",
                            "cash",
                            "creditCard",
                            "otherAsset",
                            "otherLiability"
                        ]
                    },
                    "balance": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Starting balance in currency units, negative for a liability.\nBecomes YNAB's \"Starting Balance\" transaction. Defaults to 0.",
                        "minimum": -999999999999,
                        "maximum": 999999999999
                    }
                },
                "required": [
                    "name",
                    "type"
                ],
                "title": "CreateYnabBudgetAccountRequest"
            },
            "CreateYnabConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Optional display name for the connection.",
                        "maxLength": 255
                    }
                },
                "title": "CreateYnabConnectionRequest"
            },
            "DestinationTypeEnum": {
                "type": "string",
                "description": "The type of destination that bank data can be transferred to.\n",
                "enum": [
                    "YNAB",
                    "LUNCH_MONEY",
                    "GOOGLE_SHEETS",
                    "NOTION"
                ],
                "title": "DestinationTypeEnum"
            },
            "EnrichmentProviderEnum": {
                "type": "string",
                "enum": [
                    "NTROPY",
                    "OPENAI",
                    "GENIE",
                    "ARRAY"
                ],
                "title": "EnrichmentProviderEnum"
            },
            "FinancialAccountBalanceResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string"
                    },
                    "amount": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code."
                    },
                    "type": {
                        "type": "string",
                        "description": "Balance type (ISO 20022)."
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Coarse classification of `type`: AVAILABLE (the balance reflects pending activity), CLEARED (settled/booked entries only), INFORMATIONAL (bank-defined semantics; may or may not include pending activity), or OTHER."
                    },
                    "reference_date": {
                        "type": "string",
                        "description": "Indicates the date of the balance."
                    },
                    "credit_limit_included": {
                        "type": "string",
                        "description": "A flag indicating if the credit limit of the corresponding account is included in the calculation of the balance, where applicable."
                    },
                    "last_committed_transaction_entry_ref": {
                        "type": "string",
                        "description": "Entry reference of the last committed transaction."
                    },
                    "integrator_last_changed_at": {
                        "type": "string",
                        "description": "The date and time the balance was last changed, as reported by the integrator, where available."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "amount",
                    "currency",
                    "type",
                    "category",
                    "reference_date",
                    "credit_limit_included",
                    "last_committed_transaction_entry_ref",
                    "integrator_last_changed_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "FinancialAccountBalanceResource"
            },
            "FinancialAccountResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_connection_id": {
                        "type": "string"
                    },
                    "financial_connection": {
                        "$ref": "#/components/schemas/FinancialConnectionResource"
                    },
                    "config": {
                        "description": "The financial account configuration. If the financial account has no configuration, the banks default configuration will be used.",
                        "$ref": "#/components/schemas/InstitutionConfigResource"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "enabled": {
                        "type": "string"
                    },
                    "live": {
                        "type": "string",
                        "description": "Whether the account is in use: it AND its connection are enabled. A disabled connection keeps each\naccount's own `enabled` as the user set it, but none of its accounts sync until it is enabled again."
                    },
                    "integrator": {
                        "type": "string",
                        "description": "Provider that populates this account (GOCARDLESS / AKAHU / SNAPTRADE)."
                    },
                    "account_category": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "High-level kind of account: BANK (checking/savings, provided by\nbanking providers), INVESTMENT (brokerage), DEPOSIT (cash\nsub-account at a broker), LOC (line of credit), LOAN (a manual\nloan Synci models from its terms). Determines which fields are\npopulated on the account."
                    },
                    "loan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "The loan terms, rate history and derived figures. Present on LOAN accounts only.",
                        "items": {}
                    },
                    "raw_type": {
                        "type": "string",
                        "description": "Provider's free-form sub-type label (SnapTrade only). Examples:\n\"Roth IRA\", \"TFSA\", \"Cash\". Null for bank accounts."
                    },
                    "cash_balance": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Uninvested cash held at the broker, for INVESTMENT accounts.\nNull for bank accounts.",
                        "properties": {
                            "amount": {
                                "type": "string"
                            },
                            "currency": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "amount",
                            "currency"
                        ]
                    },
                    "total_balance": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Broker-reported total account value (positions + cash) for\nINVESTMENT accounts. Brokerages report this on the account\npayload rather than as a dated snapshot, so it does not appear\nin the balances endpoint. Null for bank accounts.",
                        "properties": {
                            "amount": {
                                "type": "string"
                            },
                            "currency": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "amount",
                            "currency"
                        ]
                    },
                    "meta": {
                        "type": "string",
                        "description": "Provider-specific extras that don't fit anywhere else (e.g.\nSnapTrade's `meta.type`/`meta.status` for crypto exchanges).\nTreat as opaque \u2014 schema is provider-defined."
                    },
                    "account_number_masked": {
                        "type": "string",
                        "description": "Masked account number (e.g. \"****1234\"). Only present when the\nprovider supplies it (SnapTrade brokerages, and banks that report\na masked card PAN via GoCardless); null otherwise."
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the account, as assigned by the financial institution."
                    },
                    "custom_name": {
                        "type": "string",
                        "description": "Custom name for the account, as defined by the end user."
                    },
                    "institution_name": {
                        "type": "string",
                        "description": "The lender's name on a manual account, as the user entered it. Null on provider accounts and on manual\naccounts without one: group those under their connection's institution (\"Manual accounts\")."
                    },
                    "display_name": {
                        "type": "string",
                        "description": "Name of the account as defined by the end user within online channels."
                    },
                    "bban": {
                        "type": "string",
                        "description": "Basic Bank Account Number (BBAN)."
                    },
                    "scan": {
                        "type": "string",
                        "description": "UK SortCodeAccountNumber (6 digit sort code + 8 digit account number), reported by some UK banks."
                    },
                    "iban": {
                        "type": "string",
                        "description": "International Bank Account Number (IBAN)."
                    },
                    "bic": {
                        "type": "string",
                        "description": "Bank Identifier Code (BIC/SWIFT) associated with the account."
                    },
                    "owner_name": {
                        "type": "string",
                        "description": "Name of the legal account owner. If there is more than one owner, then e.g. two names might be noted here. For a corporate account, the corporate name is used for this attribute."
                    },
                    "owner_address": {
                        "type": "string",
                        "description": "Address of the legal account owner, when reported by the institution."
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code."
                    },
                    "product_name": {
                        "type": "string",
                        "description": "Product Name of the Institution for this account, proprietary definition."
                    },
                    "cash_account_type": {
                        "type": "string",
                        "description": "ExternalCashAccountType1Code from ISO 20022 (e.g. CACC, CARD, SVGS), when reported by the institution."
                    },
                    "account_usage": {
                        "type": "string",
                        "description": "Usage of the account: PRIV (private personal account) or ORGA (professional account)."
                    },
                    "linked_accounts": {
                        "type": "string",
                        "description": "Name of a cash account associated to pending card transactions, when the institution reports one. Banks often put that account's number here, so it is omitted with the other identifiers."
                    },
                    "details": {
                        "type": "string",
                        "description": "Specifications that might be provided by the financial institution - characteristics of the account - characteristics of the relevant card."
                    },
                    "msisdn": {
                        "type": "string",
                        "description": "An alias to a payment account via a registered mobile phone number."
                    },
                    "integrator_id": {
                        "type": "string",
                        "description": "The financial account ID provided by the integrator."
                    },
                    "institution_id": {
                        "type": "string",
                        "description": "The financial account ID provided by the institution/bank."
                    },
                    "details_last_synced_at": {
                        "type": "string",
                        "description": "Last time the financial account details were fetched from the integrator."
                    },
                    "transactions_last_synced_at": {
                        "type": "string",
                        "description": "Last time the financial account transactions were fetched from the integrator."
                    },
                    "transactions_backfill_cursor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "History is fetched newest-first in windows of up to 90 days. While older\nwindows are still being fetched this is the earliest date already covered;\ntransactions before it arrive on subsequent syncs, at the pace the\ninstitution's daily request allowance permits. Null once the account's\nfull history (up to the connection's `max_historical_days`) is in."
                    },
                    "balances_last_synced_at": {
                        "type": "string",
                        "description": "Last time the financial account balances were fetched from the integrator."
                    },
                    "balance": {
                        "type": "object",
                        "description": "Balance of the account at the last sync. To get all types of balances at different dates, use the balances endpoints.",
                        "properties": {
                            "available": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "integer",
                                        "enum": [
                                            0
                                        ]
                                    }
                                ]
                            },
                            "cleared": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "integer",
                                        "enum": [
                                            0
                                        ]
                                    }
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "description": "ISO 4217 currency of these figures. Only differs from the\naccount's `currency` on a multi-currency account (`XXX`),\nwhich holds a balance per currency: this is the one shown."
                            }
                        },
                        "required": [
                            "currency"
                        ]
                    },
                    "rules": {
                        "type": "array",
                        "description": "The rules attached to this financial account",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order": {
                                    "type": "integer"
                                },
                                "rule": {
                                    "type": "object",
                                    "additionalProperties": {}
                                }
                            },
                            "required": [
                                "order",
                                "rule"
                            ]
                        }
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLinkResource"
                        }
                    },
                    "transfer_links_count": {
                        "type": "string",
                        "description": "Left out for tokens without the `transfer-links:read` scope."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "enabled",
                    "live",
                    "integrator",
                    "account_category",
                    "raw_type",
                    "cash_balance",
                    "total_balance",
                    "meta",
                    "name",
                    "custom_name",
                    "institution_name",
                    "display_name",
                    "currency",
                    "product_name",
                    "cash_account_type",
                    "account_usage",
                    "details",
                    "details_last_synced_at",
                    "transactions_last_synced_at",
                    "transactions_backfill_cursor",
                    "balances_last_synced_at",
                    "balance",
                    "created_at",
                    "updated_at"
                ],
                "title": "FinancialAccountResource"
            },
            "FinancialConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "institution_id": {
                        "type": "string"
                    },
                    "region": {
                        "type": "string",
                        "description": "Residency region of the connection's data (`eu`, `us`), decided\nby the institution's provider when the connection was created."
                    },
                    "institution": {
                        "$ref": "#/components/schemas/InstitutionResource"
                    },
                    "enabled": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Provider-neutral lifecycle status (PENDING_AUTHORIZATION / CONNECTED / ...)."
                    },
                    "status_message": {
                        "type": "string",
                        "description": "Provider status message."
                    },
                    "sync_balances": {
                        "type": "string",
                        "description": "Whether balances should be synced. Applies to all accounts belonging to this connection."
                    },
                    "supports_reauthorization": {
                        "type": "boolean",
                        "description": "Whether `PUT /reauthorize` will start a fresh OAuth flow against this connection's\nprovider. True for every currently supported provider (GoCardless renews PSD2 consent;\nAkahu and SnapTrade re-grant a previously-disabled connection). When false, the\nreauthorize endpoint responds with `REAUTHORIZATION_NOT_SUPPORTED`."
                    },
                    "supports_manage": {
                        "type": "boolean",
                        "description": "Whether GET /manage will return a URL you can redirect the user to so\nthey can manage their existing connections directly with the provider. Currently\ntrue for Akahu (sends them to oauth.akahu.nz where they can add / revoke banks\nunder their enduring consent), false for GoCardless and SnapTrade."
                    },
                    "max_historical_days": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The maximum number of days of historical data Synci is able to fetch. Applies to all accounts belonging to this connection."
                    },
                    "access_valid_for_days": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Also known as consent lifetime. The number of days Synci is able to access accounts belonging to this connection.\nE.g. if this is set to 180 days, you will have to re-authenticate the connection every 180 days.\nSynci will send you an email when the expiry date is approaching."
                    },
                    "consent_expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The date and time when the bank consent expires and the connection\nhas to be reauthorized, or null for providers that grant enduring\nconsent (Akahu, SnapTrade)."
                    },
                    "reference": {
                        "type": "string",
                        "description": "Caller-supplied correlation id set at creation (e.g. a platform\ndeveloper's own end-user id). Filterable via ?filter[reference]=."
                    },
                    "accounts_last_synced_at": {
                        "type": "string"
                    },
                    "setup_pending": {
                        "type": "boolean",
                        "description": "Whether the post-connection setup (choosing accounts, naming them,\npicking a sync start date) is still to be finished. While true the\naccounts exist but their first transaction sync is held back until\n`POST /setup/complete`, or until the setup goes stale. Always false\nfor connections created by API clients."
                    },
                    "setup_renewal": {
                        "type": "boolean",
                        "description": "True while a pending setup belongs to a consent renewal rather than a new connection: only the\naccount choice is asked for, and the accounts the user had enabled stay pre-selected."
                    },
                    "activated_at": {
                        "type": "string",
                        "description": "When the connection first went live (provider callback succeeded).\nNull while consent is still pending or the flow was abandoned."
                    },
                    "financial_accounts": {
                        "type": "array",
                        "description": "Financial accounts belonging to this connection.",
                        "items": {
                            "$ref": "#/components/schemas/FinancialAccountResource"
                        }
                    },
                    "financial_accounts_count": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "institution_id",
                    "region",
                    "enabled",
                    "status",
                    "status_message",
                    "sync_balances",
                    "supports_reauthorization",
                    "supports_manage",
                    "max_historical_days",
                    "access_valid_for_days",
                    "consent_expires_at",
                    "reference",
                    "accounts_last_synced_at",
                    "setup_pending",
                    "setup_renewal",
                    "activated_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "FinancialConnectionResource"
            },
            "GoogleSheetResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "connection_id": {
                        "type": "string"
                    },
                    "connection": {
                        "$ref": "#/components/schemas/GoogleSheetsConnectionResource"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the spreadsheet in Synci."
                    },
                    "spreadsheet_id": {
                        "type": "string",
                        "description": "The spreadsheet's ID in Google Sheets, as found in its URL."
                    },
                    "spreadsheet_name": {
                        "type": "string",
                        "description": "The spreadsheet's title in Google Sheets."
                    },
                    "spreadsheet_url": {
                        "type": "string",
                        "description": "Link to open the spreadsheet in Google Sheets."
                    },
                    "is_synci_managed": {
                        "type": "string",
                        "description": "True when the spreadsheet was created by Synci; false when an existing spreadsheet was attached."
                    },
                    "transactions_sheet_gid": {
                        "type": "string",
                        "description": "The gid of the tab that receives transactions, if assigned."
                    },
                    "transactions_sheet_name": {
                        "type": "string",
                        "description": "The name of the tab that receives transactions, if assigned."
                    },
                    "live_balance_sheet_gid": {
                        "type": "string",
                        "description": "The gid of the tab that holds current balances, if assigned."
                    },
                    "live_balance_sheet_name": {
                        "type": "string",
                        "description": "The name of the tab that holds current balances, if assigned."
                    },
                    "balance_history_sheet_gid": {
                        "type": "string",
                        "description": "The gid of the tab that records balance history, if assigned."
                    },
                    "balance_history_sheet_name": {
                        "type": "string",
                        "description": "The name of the tab that records balance history, if assigned."
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLinkResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string",
                        "description": "When data was last synced to the spreadsheet."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "connection_id",
                    "name",
                    "spreadsheet_id",
                    "spreadsheet_name",
                    "spreadsheet_url",
                    "is_synci_managed",
                    "transactions_sheet_gid",
                    "transactions_sheet_name",
                    "live_balance_sheet_gid",
                    "live_balance_sheet_name",
                    "balance_history_sheet_gid",
                    "balance_history_sheet_name",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "GoogleSheetResource"
            },
            "GoogleSheetsConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether syncing through this connection is enabled."
                    },
                    "auth_url": {
                        "type": "string",
                        "description": "URL to authorize the connection with Google. Only present when authorization is required."
                    },
                    "google_email": {
                        "type": "string",
                        "description": "Email address of the connected Google account."
                    },
                    "sheets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/GoogleSheetResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "enabled",
                    "google_email",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "GoogleSheetsConnectionResource"
            },
            "HealthResource": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "description": "Health status: HEALTHY (last request succeeded), FAILING (recent requests failed), or DEAD (10 or more consecutive failures)."
                    },
                    "integrator_message": {
                        "type": "string",
                        "description": "The most recent error message reported by the provider, if any."
                    },
                    "failure_count": {
                        "type": "string",
                        "description": "The number of consecutive failed requests."
                    },
                    "transient_message": {
                        "type": "string",
                        "description": "A provider-side outage currently blocking part of the sync (for example the institution being down for maintenance). Not counted as a failure: the status stays HEALTHY while Synci retries automatically. Null when nothing is being retried."
                    },
                    "transient_failure_count": {
                        "type": "string",
                        "description": "The number of consecutive sync attempts refused by that outage."
                    },
                    "last_attempt_at": {
                        "type": "string",
                        "description": "When the last sync attempt occurred."
                    }
                },
                "required": [
                    "status",
                    "integrator_message",
                    "failure_count",
                    "transient_message",
                    "transient_failure_count",
                    "last_attempt_at"
                ],
                "title": "HealthResource"
            },
            "ImportBatchResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string"
                    },
                    "format": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "CAMT053, OFX or CSV, as detected from the file."
                    },
                    "filename": {
                        "type": "string"
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "PENDING_REVIEW, COMMITTING, COMPLETED, UNDOING, UNDONE, FAILED or EXPIRED."
                    },
                    "row_count": {
                        "type": "integer",
                        "description": "Rows in the file, valid or not."
                    },
                    "imported_count": {
                        "type": "integer",
                        "description": "Rows written by the commit. 0 until then."
                    },
                    "duplicate_count": {
                        "type": "integer",
                        "description": "Rows skipped because the account already had them."
                    },
                    "skipped_count": {
                        "type": "integer",
                        "description": "Rows the parser could not read as a transaction."
                    },
                    "date_from": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "date_to": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "closing_balance": {
                        "type": "string",
                        "description": "The closing balance the file stated, or the last running balance a CSV mapped. Signed."
                    },
                    "closing_balance_date": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "balance_result": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "After commit: CHECKPOINTED when the closing balance was recorded, UNCHANGED when the file carried none."
                    },
                    "balance_adjustment": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The ADJUSTMENT row the checkpoint posted when the derived balance differed. Null otherwise.",
                        "properties": {
                            "amount": {
                                "type": "string"
                            },
                            "transaction_id": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "amount",
                            "transaction_id"
                        ]
                    },
                    "mapping": {
                        "type": "string",
                        "description": "The CSV mapping this batch is read with. Null for camt.053 and OFX."
                    },
                    "mapping_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "SAVED (the account's saved mapping), PROPOSED (suggested for this file) or MANUAL (edited by the user)."
                    },
                    "error": {
                        "type": "string",
                        "description": "Why the batch FAILED, in words the user can act on."
                    },
                    "preview": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Counts over the whole file (new, duplicate, invalid), warnings, the statement's account and, for a CSV, the raw headers, column count and mapping confidence. Present while the batch is under review; the rows are on the rows endpoint. The statement account's number and owner are left out for a caller that may not read sensitive identifiers.",
                        "additionalProperties": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "committed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When an unconfirmed batch is discarded."
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "format",
                    "filename",
                    "status",
                    "row_count",
                    "imported_count",
                    "duplicate_count",
                    "skipped_count",
                    "date_from",
                    "date_to",
                    "closing_balance",
                    "closing_balance_date",
                    "balance_result",
                    "balance_adjustment",
                    "mapping",
                    "mapping_source",
                    "error",
                    "created_at",
                    "committed_at",
                    "expires_at"
                ],
                "title": "ImportBatchResource"
            },
            "ImportBatchRowResource": {
                "type": "object",
                "properties": {
                    "index": {
                        "anyOf": [
                            {
                                "type": "integer",
                                "description": "Zero-based position in the file, header row excluded."
                            },
                            {}
                        ]
                    },
                    "status": {
                        "anyOf": [
                            {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "NEW (will be written), DUPLICATE (the account already has it) or INVALID (could not be read as a transaction)."
                            },
                            {}
                        ]
                    },
                    "reason": {
                        "anyOf": [
                            {
                                "type": "string",
                                "description": "Why the row is a duplicate or invalid. Null for a new row."
                            },
                            {}
                        ]
                    },
                    "cells": {
                        "anyOf": [
                            {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The row's cells as they appear in a CSV, one string per source column (`preview.source.column_count` long). Null for camt.053 and OFX, and for a caller that may not read sensitive identifiers."
                            },
                            {}
                        ]
                    }
                },
                "required": [
                    "index",
                    "status",
                    "reason",
                    "cells"
                ],
                "additionalProperties": {},
                "title": "ImportBatchRowResource"
            },
            "InstitutionConfigResource": {
                "type": "object",
                "properties": {
                    "map_fields": {
                        "type": "object",
                        "description": "Which field(s) are used when mapping the \"payee\", \"description\" and \"date\" fields for a transaction.\nOne of the fixed option names (`AUTO`, `NONE`, `CREDITOR_NAME`, `BOOKING_DATE`, ...).\nVersion 2 of the API stores an ordered fallback chain per field instead; this is the closest fixed\noption for the stored chain, and a chain without an equivalent reads as `AUTO`.",
                        "properties": {
                            "payee": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "date": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "payee",
                            "description",
                            "date"
                        ]
                    },
                    "enrichment": {
                        "type": "object",
                        "description": "Enrich transaction data with additional information from an external provider",
                        "properties": {
                            "enabled": {
                                "type": "string",
                                "description": "Whether transaction enrichment is enabled"
                            },
                            "provider": {
                                "type": "string",
                                "description": "The provider to use for transaction enrichment."
                            },
                            "country": {
                                "type": "string",
                                "description": "The country where transactions are made. Providing a country significantly improves enrichment accuracy."
                            }
                        },
                        "required": [
                            "enabled",
                            "provider",
                            "country"
                        ]
                    },
                    "sync_start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The date to start syncing transactions from.\nCannot be earlier than the date the connection was authorized minus the connection's `max_historical_days`.\nWill default to today if not set.",
                        "examples": [
                            "2025-01-01"
                        ]
                    },
                    "sync_auto": {
                        "type": "string",
                        "description": "Whether data should be synced automatically. If set to false, you will need to manually trigger a sync every time you want to refresh data."
                    },
                    "sync_pending_transactions": {
                        "type": "string",
                        "description": "Whether pending transactions should be synced. For some banks, setting this to true can cause duplicate transactions."
                    },
                    "pending_settlement_matching": {
                        "type": "string",
                        "description": "Whether a booked transaction can settle an existing pending transaction when the amount changed.\nCard pre-authorizations (fuel stations, hotels, car rentals) are often authorized with a placeholder amount\nthat changes when the transaction is booked, together with the transaction's identifiers.\nWhen enabled, a booked transaction that matches a pending transaction's counterparty (and card details,\nwhen the bank provides them) within `pending_settlement_max_days` days updates that pending transaction\ninstead of creating a duplicate.\nOnly pending transactions are matched this way; deduplication of booked transactions is unaffected.\nEnabled by default; `null` means the default applies."
                    },
                    "pending_settlement_max_days": {
                        "type": "string",
                        "description": "The maximum number of days between a pending transaction and its booked settlement\nfor `pending_settlement_matching` to link the two. Defaults to 7; `null` means the default applies."
                    },
                    "fuzzy_counterparty_matching": {
                        "type": "string",
                        "description": "Whether a counterparty name the bank re-words when a transaction settles can still match\nthe pending entry it replaces (\"NORWEGIAN.COM\" settling as \"NORWEGIAN.C 3284405123\").\nDescriptors that conflict rather than truncate or extend never match, and only pending\ntransactions are matched this way.\nEnabled by default; `null` means the default applies."
                    },
                    "fuzzy_counterparty_min_chars": {
                        "type": "string",
                        "description": "The minimum number of characters two re-worded counterparty descriptors must align on for\n`fuzzy_counterparty_matching` to treat them as the same party. Defaults to 6; `null` means\nthe default applies."
                    },
                    "sync_balances": {
                        "type": "string",
                        "description": "Whether balances should be synced."
                    },
                    "sync_frequency_in_minutes": {
                        "type": "string",
                        "description": "How often to sync data, in minutes. The permitted minimum is set by the\nsubscriber's plan (`max_sync_frequency_minutes` in the plan's features, see\n`GET /billing/plans`); 30 is only the absolute lower bound any plan could set. This is the CONFIGURED value. The interval actually used may be longer if the\ninstitution has refused requests on its own daily cap, in which case the account\nis demoted to a slower cadence automatically."
                    },
                    "fields_for_duplicate_filtering": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "An array of Transaction fields to use when filtering duplicate transactions.\nWhen a new transaction is synced, these fields are compared with existing transactions.\nIf the fields are identical, the new transaction is considered a duplicate and will be ignored.\nThis should only be used if you are struggling with duplicate transactions, and know which fields can be used to filter them. For everyone else, omit this field.",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "map_fields",
                    "enrichment",
                    "sync_start_date",
                    "sync_auto",
                    "sync_pending_transactions",
                    "pending_settlement_matching",
                    "pending_settlement_max_days",
                    "fuzzy_counterparty_matching",
                    "fuzzy_counterparty_min_chars",
                    "sync_balances",
                    "sync_frequency_in_minutes"
                ],
                "title": "InstitutionConfigResource"
            },
            "InstitutionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "integrator": {
                        "type": "string",
                        "description": "The integrator used to connect to this institution."
                    },
                    "region": {
                        "type": "string",
                        "description": "Residency region connections to this institution are stored in (`eu`, `us`)."
                    },
                    "country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code."
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the institution."
                    },
                    "bic": {
                        "type": "string",
                        "description": "Institution Identifier Code (BIC/SWIFT code)."
                    },
                    "external_id": {
                        "type": "string",
                        "description": "The ID of the institution as provided by the integrator."
                    },
                    "logo": {
                        "type": "string",
                        "description": "URL to the institution's logo, as provided by the integrator."
                    },
                    "supported": {
                        "type": "string",
                        "description": "Whether the institution is supported. Will be true in most cases, but might be false if the integrator stops supporting an institution."
                    },
                    "supports_pending_transactions": {
                        "type": "string",
                        "description": "Whether the institution supports pending transactions."
                    },
                    "supports_card_accounts": {
                        "type": "string",
                        "description": "Whether the institution supports card accounts."
                    },
                    "max_historical_days": {
                        "type": "string",
                        "description": "The maximum number of days of historical data this institution can provide.\n`null` where the provider imposes no such limit and fetches whatever the bank\nholds, which is the case for every US institution. Do not read null as zero."
                    },
                    "max_access_valid_for_days": {
                        "type": "string",
                        "description": "Also known as consent lifetime. The maximum number of days access to this institution may be valid for.\nFor most European institutions this ranges from 90 to 180 days. `null` where access does not\nexpire on a schedule and no periodic re-consent is required, which is the case for every US\ninstitution: those connections break only when the bank breaks them."
                    },
                    "supported_products": {
                        "type": "string",
                        "description": "The kinds of data this institution can serve, e.g. `[\"ACCOUNTS\", \"TRANSACTIONS\", \"INVESTMENTS\"]`.\n`null` means the provider does not report it, NOT that the institution serves nothing: treat it\nas no information rather than as a negative. Only US institutions report it today."
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The category of the financial institution."
                    },
                    "updated_at": {
                        "type": "string",
                        "description": "The date and time when the institution was last updated."
                    }
                },
                "required": [
                    "id",
                    "integrator",
                    "region",
                    "country",
                    "name",
                    "bic",
                    "external_id",
                    "logo",
                    "supported",
                    "supports_pending_transactions",
                    "supports_card_accounts",
                    "max_historical_days",
                    "max_access_valid_for_days",
                    "supported_products",
                    "category",
                    "updated_at"
                ],
                "title": "InstitutionResource"
            },
            "IntegratorEnum": {
                "type": "string",
                "description": "The provider a financial connection or account is sourced from: GOCARDLESS (EU/UK banks), AKAHU (NZ banks), ARRAY (US banks), SNAPTRADE (brokerages and crypto exchanges), DEMO (Synci's demo banks) or MANUAL (accounts the user keeps by hand, such as loans, which Synci never syncs). UNKNOWN is used for accounts created manually via the API.\n| |\n|---|\n| `UNKNOWN` <br/>  |\n| `GOCARDLESS` <br/>  |\n| `AKAHU` <br/>  |\n| `ARRAY` <br/> US banks. One connection can carry depository, liability and investment accounts, and transactions arrive already enriched. Connections cannot be created through the API: the consent flow is an embedded SDK, so they are started from the Synci Dashboard or the connection portal. |\n| `SNAPTRADE` <br/>  |\n| `DEMO` <br/> Synci's demo banks. Accounts, balances and transactions are generated by Synci rather than fetched from a bank, and otherwise behave like real data: syncs, webhooks and transfer links all run. |\n| `MANUAL` <br/> Accounts the user maintains by hand: today manual loan accounts, whose rows Synci generates from the loan terms and the payments it matches. Each user has one \"Manual accounts\" connection, created lazily, that never syncs and has no provider handler. |",
                "enum": [
                    "UNKNOWN",
                    "GOCARDLESS",
                    "AKAHU",
                    "ARRAY",
                    "SNAPTRADE",
                    "DEMO",
                    "MANUAL"
                ],
                "title": "IntegratorEnum"
            },
            "LoanDayCountEnum": {
                "type": "string",
                "description": "How days between two dates are counted when accruing interest, and the denominator that goes with them.\n",
                "enum": [
                    "ACT_365",
                    "ACT_360",
                    "THIRTY_360"
                ],
                "title": "LoanDayCountEnum"
            },
            "LoanKindEnum": {
                "type": "string",
                "description": "What kind of debt a manual loan account is. Drives the default account type when the loan is created in a destination.\n",
                "enum": [
                    "MORTGAGE",
                    "STUDENT",
                    "AUTO",
                    "PERSONAL",
                    "OTHER"
                ],
                "title": "LoanKindEnum"
            },
            "LoanRepaymentTypeEnum": {
                "type": "string",
                "description": "How the loan is paid down. Only the months-remaining estimate depends on it; the interest, fee and payment split never does.\n",
                "enum": [
                    "ANNUITY",
                    "SERIAL",
                    "INTEREST_ONLY"
                ],
                "title": "LoanRepaymentTypeEnum"
            },
            "LoanTermsResource": {
                "type": "object",
                "properties": {
                    "kind": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "MORTGAGE, STUDENT, AUTO, PERSONAL or OTHER. Drives the default account type in destinations."
                    },
                    "repayment_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ANNUITY, SERIAL or INTEREST_ONLY. Only the months-remaining estimate depends on it."
                    },
                    "fee_per_payment": {
                        "type": "number",
                        "description": "Fixed fee posted with every regular payment."
                    },
                    "day_count": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ACT_365, ACT_360 or THIRTY_360."
                    },
                    "current_rate": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "The annual rate in force today, in percent."
                    },
                    "rate_periods": {
                        "type": "string",
                        "description": "Every rate period, oldest first."
                    },
                    "anchor_balance": {
                        "type": "number",
                        "description": "The balance the user last verified (negative: money owed) and the date it was true. Every balance is derived from it."
                    },
                    "anchor_date": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "balance_verified_at": {
                        "type": "string"
                    },
                    "paying_financial_account_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The bank account whose matched payments drive the loan, or null in schedule mode. Also null for an app the user did not share that account with."
                    },
                    "schedule": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Schedule mode: a fixed amount posted on a day of month when no bank account pays the loan.",
                        "properties": {
                            "amount": {
                                "type": "number"
                            },
                            "day_of_month": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "amount",
                            "day_of_month"
                        ]
                    },
                    "last_regular_payment_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "The amount of the last payment Synci took as the regular one."
                    },
                    "expected_payment_day": {
                        "type": "string",
                        "description": "The day of month payments are expected on, from the last regular payment or the schedule."
                    },
                    "payment_change": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "A payment whose amount changed on cycle, awaiting the user's answer to \"has the rate changed?\". Null when nothing is pending.",
                        "properties": {
                            "booking_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The date of the payment that changed."
                            },
                            "previous_amount": {
                                "type": "number"
                            },
                            "amount": {
                                "type": "number",
                                "description": "The new amount."
                            },
                            "detected_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "booking_date",
                            "previous_amount",
                            "amount",
                            "detected_at"
                        ]
                    },
                    "next_payment_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the next payment is expected: the next schedule day, or a month after the last regular payment. Null before either is known."
                    },
                    "months_remaining_estimate": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Rough months until paid off from the current balance, rate and regular payment; null when unknown."
                    },
                    "original_amount": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "term_months": {
                        "type": "string"
                    },
                    "last_accrual_date": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "kind",
                    "repayment_type",
                    "fee_per_payment",
                    "day_count",
                    "current_rate",
                    "rate_periods",
                    "anchor_balance",
                    "anchor_date",
                    "balance_verified_at",
                    "paying_financial_account_id",
                    "schedule",
                    "last_regular_payment_amount",
                    "expected_payment_day",
                    "payment_change",
                    "next_payment_date",
                    "months_remaining_estimate",
                    "original_amount",
                    "start_date",
                    "term_months",
                    "last_accrual_date"
                ],
                "title": "LoanTermsResource"
            },
            "LunchMoneyAccountResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "connection_id": {
                        "type": "string"
                    },
                    "connection": {
                        "$ref": "#/components/schemas/LunchMoneyConnectionResource"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "lunch_money_id": {
                        "type": "string",
                        "description": "The account's ID in Lunch Money."
                    },
                    "name": {
                        "type": "string"
                    },
                    "display_name": {
                        "type": "string",
                        "description": "The account's display name in Lunch Money, if set."
                    },
                    "type": {
                        "type": "string",
                        "description": "The account type as reported by Lunch Money, e.g. \"cash\" or \"credit\"."
                    },
                    "subtype": {
                        "type": "string",
                        "description": "The account subtype as reported by Lunch Money, if set."
                    },
                    "currency": {
                        "type": "string"
                    },
                    "balance": {
                        "type": "string",
                        "description": "The account balance as reported by Lunch Money."
                    },
                    "balance_as_of": {
                        "type": "string",
                        "description": "When the balance was last updated in Lunch Money."
                    },
                    "closed_on": {
                        "type": "string",
                        "description": "When the account was closed in Lunch Money, if closed."
                    },
                    "exclude_from_transactions": {
                        "type": "string",
                        "description": "Whether the account is excluded from transactions in Lunch Money."
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLinkResource"
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "connection_id",
                    "lunch_money_id",
                    "name",
                    "display_name",
                    "type",
                    "subtype",
                    "currency",
                    "balance",
                    "balance_as_of",
                    "closed_on",
                    "exclude_from_transactions",
                    "created_at",
                    "updated_at"
                ],
                "title": "LunchMoneyAccountResource"
            },
            "LunchMoneyAccountTypeEnum": {
                "type": "string",
                "description": "The manual account type, as defined by Lunch Money.\n",
                "enum": [
                    "cash",
                    "credit",
                    "investment",
                    "real estate",
                    "loan",
                    "vehicle",
                    "cryptocurrency",
                    "employee compensation",
                    "other liability",
                    "other asset"
                ],
                "title": "LunchMoneyAccountTypeEnum"
            },
            "LunchMoneyConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "name": {
                        "type": "string",
                        "description": "The name of the connected Lunch Money budget."
                    },
                    "lunch_money_details": {
                        "type": "object",
                        "description": "Details about the connected Lunch Money account.",
                        "properties": {
                            "user_name": {
                                "type": "string",
                                "description": "Name of the Lunch Money user."
                            },
                            "user_email": {
                                "type": "string",
                                "description": "Email address of the Lunch Money user."
                            },
                            "user_id": {
                                "type": "string",
                                "description": "The user's ID in Lunch Money."
                            },
                            "bank_account_id": {
                                "type": "string",
                                "description": "The connected account's ID in Lunch Money."
                            },
                            "budget_name": {
                                "type": "string",
                                "description": "Name of the connected Lunch Money budget."
                            },
                            "primary_currency": {
                                "type": "string",
                                "description": "The budget's primary currency in Lunch Money."
                            },
                            "api_key_label": {
                                "type": "string",
                                "description": "Label of the Lunch Money API token used by this connection, if set."
                            }
                        },
                        "required": [
                            "user_name",
                            "user_email",
                            "user_id",
                            "bank_account_id",
                            "budget_name",
                            "primary_currency",
                            "api_key_label"
                        ]
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether syncing through this connection is enabled."
                    },
                    "sync_balances": {
                        "type": "string",
                        "description": "Whether account balances are synced to Lunch Money."
                    },
                    "sync_transactions": {
                        "type": "string",
                        "description": "Whether transactions are synced to Lunch Money."
                    },
                    "last_synced_at": {
                        "type": "string"
                    },
                    "accounts": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LunchMoneyAccountResource"
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "lunch_money_details",
                    "enabled",
                    "sync_balances",
                    "sync_transactions",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "LunchMoneyConnectionResource"
            },
            "NotionConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether syncing through this connection is enabled."
                    },
                    "auth_url": {
                        "type": "string",
                        "description": "URL to authorize the connection with Notion. Only present when authorization is required."
                    },
                    "workspace_id": {
                        "type": "string",
                        "description": "The connected Notion workspace."
                    },
                    "workspace_name": {
                        "type": "string"
                    },
                    "workspace_icon": {
                        "type": "string",
                        "description": "Emoji or image URL of the workspace icon, if any."
                    },
                    "owner_email": {
                        "type": "string",
                        "description": "Email of the Notion user who authorized the connection, when shared."
                    },
                    "duplicated_template_id": {
                        "type": "string",
                        "description": "The page Notion created when the user duplicated the Synci template during authorization, if any."
                    },
                    "databases": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/NotionDatabaseResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "enabled",
                    "workspace_id",
                    "workspace_name",
                    "workspace_icon",
                    "owner_email",
                    "duplicated_template_id",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "NotionConnectionResource"
            },
            "NotionDatabaseResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "connection_id": {
                        "type": "string"
                    },
                    "connection": {
                        "$ref": "#/components/schemas/NotionConnectionResource"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the database in Synci."
                    },
                    "title": {
                        "type": "string",
                        "description": "The database's title in Notion."
                    },
                    "database_id": {
                        "type": "string",
                        "description": "The Notion database ID."
                    },
                    "data_source_id": {
                        "type": "string",
                        "description": "The Notion data source (table) transactions are written to."
                    },
                    "database_url": {
                        "type": "string",
                        "description": "Link to open the database in Notion."
                    },
                    "parent_page_id": {
                        "type": "string",
                        "description": "The Notion page the database lives under, when known, and its title\n(a dashboard's `name` falls back to this)."
                    },
                    "parent_page_title": {
                        "type": "string"
                    },
                    "is_synci_managed": {
                        "type": "string",
                        "description": "True when the database was created by Synci; false when an existing database was attached."
                    },
                    "layout": {
                        "type": "string",
                        "description": "\"dashboard\" when the Synci Finance template was adopted (transactions relate to Accounts,\nCategories and Months); \"flat\" for plain databases."
                    },
                    "header_config": {
                        "type": "string",
                        "description": "Ordered list of transaction field keys written as database properties."
                    },
                    "property_map": {
                        "type": "string",
                        "description": "Field key to Notion property id map Synci writes through."
                    },
                    "accounts_database_id": {
                        "type": "string",
                        "description": "The supporting databases next to this one, when present."
                    },
                    "categories_database_id": {
                        "type": "string"
                    },
                    "months_database_id": {
                        "type": "string"
                    },
                    "balance_history_database_id": {
                        "type": "string"
                    },
                    "balance_available": {
                        "type": "string",
                        "description": "Whether balance databases exist or can be provisioned (requires a parent page)."
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLinkResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string",
                        "description": "When data was last synced to the database."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "connection_id",
                    "name",
                    "title",
                    "database_id",
                    "data_source_id",
                    "database_url",
                    "parent_page_id",
                    "parent_page_title",
                    "is_synci_managed",
                    "layout",
                    "header_config",
                    "property_map",
                    "accounts_database_id",
                    "categories_database_id",
                    "months_database_id",
                    "balance_history_database_id",
                    "balance_available",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "NotionDatabaseResource"
            },
            "PreviewRuleRequest": {
                "type": "object",
                "properties": {
                    "rule_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The ID of an existing rule to preview. Omit to provide an inline rule definition instead."
                    },
                    "rule": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Inline rule definition (required when rule_id is absent)",
                        "properties": {
                            "trigger_on_any_condition": {
                                "type": [
                                    "boolean",
                                    "null"
                                ]
                            },
                            "conditions": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "field_name": {
                                            "type": "string"
                                        },
                                        "operator": {
                                            "$ref": "#/components/schemas/RuleOperatorEnum"
                                        },
                                        "value": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 10000
                                        },
                                        "transaction_type": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/TransactionTypeEnum"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "maxItems": 10
                            },
                            "actions": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "action_type": {
                                            "$ref": "#/components/schemas/RuleActionTypeEnum"
                                        },
                                        "field_name": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "value": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Action value. Supports Liquid templates, e.g. `{{ transaction.creditor.name | remove: \"PREFIX \" }}`.",
                                            "maxLength": 10000
                                        },
                                        "order": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "action_type"
                                    ]
                                },
                                "maxItems": 10
                            }
                        }
                    },
                    "transaction_ids": {
                        "type": "array",
                        "description": "The IDs of the transactions to preview the rule against. The transactions must belong to the authenticated user. Maximum 25 per request.",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1,
                        "maxItems": 25
                    }
                },
                "required": [
                    "rule",
                    "transaction_ids"
                ],
                "title": "PreviewRuleRequest"
            },
            "ReauthorizeFinancialConnectionRequest": {
                "type": "object",
                "properties": {
                    "max_historical_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The maximum number of days of historical data Synci should be able to fetch. Applies to all accounts belonging to this connection. Use the institutions endpoint (GET /finance/institutions) to find out the maximum historical days for an institution.",
                        "minimum": 0
                    },
                    "access_valid_for_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Also known as consent lifetime. The number of days Synci should be able to access accounts belonging to this connection.\nE.g. if this is set to 180 days, you will have to re-authenticate the connection every 180 days.\nSynci will email you when the expiry date is approaching. Use the institutions endpoint (GET /finance/institutions) to find out the maximum access valid for days for an institution.",
                        "minimum": 1
                    },
                    "sync_balances": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "integrator": {
                        "$ref": "#/components/schemas/IntegratorEnum"
                    }
                },
                "title": "ReauthorizeFinancialConnectionRequest"
            },
            "ReorderFinancialAccountRulesRequest": {
                "type": "object",
                "properties": {
                    "rule_ids": {
                        "type": "array",
                        "description": "The IDs of the rules attached to the financial account, in the desired execution order.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "rule_ids"
                ],
                "title": "ReorderFinancialAccountRulesRequest"
            },
            "ReorderTransferLinkRulesRequest": {
                "type": "object",
                "properties": {
                    "rule_ids": {
                        "type": "array",
                        "description": "The IDs of the rules attached to the transfer link, in the desired execution order.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "rule_ids"
                ],
                "title": "ReorderTransferLinkRulesRequest"
            },
            "RetryTransfersAllLinksRequest": {
                "type": "object",
                "properties": {
                    "transaction_ids": {
                        "type": "array",
                        "description": "The IDs of the transactions to retry transferring across all of your transfer links.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "transaction_ids"
                ],
                "title": "RetryTransfersAllLinksRequest"
            },
            "RetryTransfersRequest": {
                "type": "object",
                "properties": {
                    "transaction_ids": {
                        "type": "array",
                        "description": "The IDs of the transactions to retry transferring. The transactions must belong to the transfer link's financial account.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "transaction_ids"
                ],
                "title": "RetryTransfersRequest"
            },
            "RuleActionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "order": {
                        "type": "string",
                        "description": "The position of the action in the rule's action list. Actions are executed in ascending order."
                    },
                    "action_type": {
                        "type": "string",
                        "description": "The kind of change the action performs."
                    },
                    "field_name": {
                        "type": "string",
                        "description": "The name of the field the action sets.",
                        "examples": [
                            "memo"
                        ]
                    },
                    "value": {
                        "type": "string",
                        "description": "The value to set. Supports plain strings or Liquid templates for dynamic expressions.",
                        "examples": [
                            "{{ transaction.remittance_information.unstructured | remove: \"REF \" }}"
                        ]
                    },
                    "rules": {
                        "type": "array",
                        "description": "The rules the action belongs to.",
                        "items": {
                            "$ref": "#/components/schemas/RuleResource"
                        }
                    },
                    "rules_count": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "order",
                    "action_type",
                    "field_name",
                    "value",
                    "created_at",
                    "updated_at"
                ],
                "title": "RuleActionResource"
            },
            "RuleActionTypeEnum": {
                "type": "string",
                "description": "The kind of change a rule action performs when the rule's conditions are met.\n| |\n|---|\n| `SET_DESTINATION_FIELD` <br/> Set a destination transaction field, resolved against the attached transfer link's destination. Only available for transfer rules. |\n| `SET_OUTPUT_FIELD` <br/> Set a canonical transaction field on the outgoing copy, read by canonical-output channels (spreadsheet destinations today). Only available for transfer rules. |\n| `SET_YNAB_FIELD` <br/> Set a field on the YNAB transaction. Legacy alias of SET_DESTINATION_FIELD with a YNAB field. |\n| `SET_LUNCH_MONEY_FIELD` <br/> Set a field on the Lunch Money transaction. Legacy alias of SET_DESTINATION_FIELD with a Lunch Money field. |\n| `SET_FIELD` <br/> Set a field on the transaction. |\n| `CHANGE_YNAB_FIELD` <br/>  |\n| `APPLY_REGEX` <br/>  |\n| `STOP_TRANSFER` <br/> Prevent the transaction from being transferred to the destination. Only available for transfer link rules. |",
                "enum": [
                    "SET_DESTINATION_FIELD",
                    "SET_OUTPUT_FIELD",
                    "SET_YNAB_FIELD",
                    "SET_LUNCH_MONEY_FIELD",
                    "SET_FIELD",
                    "CHANGE_YNAB_FIELD",
                    "APPLY_REGEX",
                    "STOP_TRANSFER"
                ],
                "title": "RuleActionTypeEnum"
            },
            "RuleApplicationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "rule_id": {
                        "type": "string",
                        "description": "The rule that was applied."
                    },
                    "status": {
                        "type": "string",
                        "description": "`QUEUED`, `RUNNING`, `COMPLETED` or `FAILED`."
                    },
                    "changed": {
                        "type": "string",
                        "description": "Transactions the rule's actions changed so far."
                    },
                    "total": {
                        "type": "string",
                        "description": "Transactions whose conditions matched so far."
                    },
                    "financial_account_ids": {
                        "type": "string",
                        "description": "The accounts the run covered; null means every account the rule is attached to."
                    },
                    "booking_date_after": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Only transactions booked on or after this date were considered; null means no limit."
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Recovery guidance; stored exception details are private diagnostics.",
                        "enum": [
                            "The application could not finish. Some transactions may already have changed. Review the application logs before trying again.",
                            null
                        ]
                    },
                    "started_at": {
                        "type": "string"
                    },
                    "completed_at": {
                        "type": "string"
                    },
                    "rule_logs_url": {
                        "type": "string",
                        "description": "The rule logs written by this run, for \"undo this application\" via `PUT /rule-logs/undo-bulk`."
                    },
                    "created_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "rule_id",
                    "status",
                    "changed",
                    "total",
                    "financial_account_ids",
                    "booking_date_after",
                    "message",
                    "started_at",
                    "completed_at",
                    "rule_logs_url",
                    "created_at"
                ],
                "title": "RuleApplicationResource"
            },
            "RuleConditionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "transaction_type": {
                        "type": "string",
                        "description": "The type of transaction the condition is evaluated against.",
                        "examples": [
                            "BANK"
                        ]
                    },
                    "field_name": {
                        "type": "string",
                        "description": "The name of the transaction field the condition checks.",
                        "examples": [
                            "currency"
                        ]
                    },
                    "operator": {
                        "type": "string",
                        "description": "The comparison operator used to evaluate the condition.",
                        "examples": [
                            "EQUALS"
                        ]
                    },
                    "value": {
                        "type": "string",
                        "description": "The value the transaction field is compared against.",
                        "examples": [
                            "NOK"
                        ]
                    },
                    "rules": {
                        "type": "array",
                        "description": "The rules the condition belongs to.",
                        "items": {
                            "$ref": "#/components/schemas/RuleResource"
                        }
                    },
                    "rules_count": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "transaction_type",
                    "field_name",
                    "operator",
                    "value",
                    "created_at",
                    "updated_at"
                ],
                "title": "RuleConditionResource"
            },
            "RuleLogResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "transaction_id": {
                        "type": "string",
                        "description": "The ID of the transaction the rule was applied to."
                    },
                    "transaction_type": {
                        "type": "string",
                        "description": "The type of transaction the rule was applied to.",
                        "enum": [
                            "BANK",
                            "UNKNOWN"
                        ]
                    },
                    "transfer_link_id": {
                        "type": "string",
                        "description": "The ID of the transfer link the rule ran on, if the rule was applied during a transfer."
                    },
                    "rule_id": {
                        "type": "string",
                        "description": "The ID of the rule that was applied."
                    },
                    "rule": {
                        "description": "The associated rule resource. Will be included in the response if the `include` query parameter contains `rule`.\nLeft out, with its action, when the rule also runs on an account the token was not granted.",
                        "$ref": "#/components/schemas/RuleResource"
                    },
                    "rule_action_id": {
                        "type": "string",
                        "description": "The ID of the rule action that was executed."
                    },
                    "rule_action": {
                        "description": "The associated rule action resource. Will be included in the response if the `include` query parameter contains `rule_action`.",
                        "$ref": "#/components/schemas/RuleActionResource"
                    },
                    "rule_application_id": {
                        "type": "string",
                        "description": "The retroactive rule application that wrote this log, if any."
                    },
                    "undone_log_id": {
                        "type": "string",
                        "description": "If this log is the result of an undo, this contains the ID of the original rule log that was reverted."
                    },
                    "field_name": {
                        "type": "string",
                        "description": "The name of the transaction field the action changed."
                    },
                    "previous_value": {
                        "type": "string",
                        "description": "The value of the field before the action was executed."
                    },
                    "new_value": {
                        "type": "string",
                        "description": "The value of the field after the action was executed."
                    },
                    "success": {
                        "type": "string",
                        "description": "Whether the rule action was executed successfully."
                    },
                    "message": {
                        "type": "string",
                        "description": "Additional details about the outcome, for example an error message if the action failed."
                    },
                    "executed_at": {
                        "type": "string",
                        "description": "The date and time the rule action was executed."
                    },
                    "undone_at": {
                        "type": "string",
                        "description": "The date and time this rule action was undone, if it has been undone."
                    }
                },
                "required": [
                    "id",
                    "field_name",
                    "previous_value",
                    "new_value",
                    "success",
                    "executed_at",
                    "undone_at"
                ],
                "title": "RuleLogResource"
            },
            "RuleOperatorEnum": {
                "type": "string",
                "description": "The comparison operator a rule condition uses to compare a transaction field against the condition's value.\n",
                "enum": [
                    "EQUALS",
                    "DOES_NOT_EQUAL",
                    "CONTAINS",
                    "DOES_NOT_CONTAIN",
                    "STARTS_WITH",
                    "DOES_NOT_START_WITH",
                    "ENDS_WITH",
                    "DOES_NOT_END_WITH",
                    "GREATER_THAN",
                    "GREATER_THAN_OR_EQUAL",
                    "LESS_THAN",
                    "LESS_THAN_OR_EQUAL",
                    "MATCHES_REGEX"
                ],
                "title": "RuleOperatorEnum"
            },
            "RuleResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "scope": {
                        "type": "string",
                        "description": "Where the rule runs:\n- `BANK`: applied to transactions as they are stored in Synci (changes are permanent). Attaches to financial accounts.\n- `TRANSFER`: applied while transactions are transferred to a destination (changes land only in the destination copy). Attaches to transfer links."
                    },
                    "compatible_destinations": {
                        "type": "array",
                        "description": "The destinations this transfer rule can attach to, derived from its actions.\nIncluded when the rule's actions are loaded; always empty for `BANK`-scope rules.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "output_compatible": {
                        "type": "string",
                        "description": "Whether this transfer rule can attach to a bank account as an output rule,\nshaping the account's transactions on third-party API pulls, SimpleFIN syncs,\nand webhook payloads. True when every action speaks the canonical transaction\nvocabulary. Included when the rule's actions are loaded; always false for\n`BANK`-scope rules."
                    },
                    "type": {
                        "type": "string",
                        "description": "The legacy rule type. Deprecated: use `scope` and `compatible_destinations` instead. May be null for rules created with `scope`."
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether the rule is active. Disabled rules are not applied."
                    },
                    "migrated": {
                        "type": "string",
                        "description": "Whether the rule was migrated from the old version of Synci. Does not count against your quota."
                    },
                    "trigger_on_any_condition": {
                        "type": "string",
                        "description": "When enabled, only one condition must match for the rule to be applied."
                    },
                    "skip_other_rules_when_triggered": {
                        "type": "string",
                        "description": "If the rule's conditions are met, stop processing other rules attached to the same financial account or transfer link."
                    },
                    "conditions": {
                        "type": "array",
                        "description": "Conditions are the criteria that must be met for a rule to be applied.",
                        "items": {
                            "$ref": "#/components/schemas/RuleConditionResource"
                        }
                    },
                    "conditions_count": {
                        "type": "string"
                    },
                    "actions": {
                        "type": "array",
                        "description": "Actions are the instructions that are executed when a rule's conditions are met.\nEach action includes an `order` value \u2014 actions are executed in ascending order.",
                        "items": {
                            "$ref": "#/components/schemas/RuleActionResource"
                        }
                    },
                    "actions_count": {
                        "type": "string"
                    },
                    "financial_accounts": {
                        "type": "array",
                        "description": "Financial accounts that the rule is attached to.\nEach object includes:\n- rule_position: The order of the rule in the financial account's rule list. Rules are applied in ascending order.\n- financial_account: The financial account resource data",
                        "items": {
                            "type": "object",
                            "properties": {
                                "rule_position": {
                                    "type": "integer"
                                },
                                "financial_account": {
                                    "$ref": "#/components/schemas/FinancialAccountResource"
                                }
                            },
                            "required": [
                                "rule_position",
                                "financial_account"
                            ]
                        }
                    },
                    "financial_accounts_count": {
                        "type": "string"
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Transfer links that the rule is attached to. Left out for tokens without the `transfer-links:read` scope.\nEach object includes:\n- rule_position: The order of the rule in the transfer link's rule list. Rules are applied in ascending order.\n- transfer_link: The transfer link resource data",
                        "items": {
                            "type": "object",
                            "properties": {
                                "rule_position": {
                                    "type": "integer"
                                },
                                "transfer_link": {
                                    "$ref": "#/components/schemas/TransferLinkResource"
                                }
                            },
                            "required": [
                                "rule_position",
                                "transfer_link"
                            ]
                        }
                    },
                    "transfer_links_count": {
                        "type": "string",
                        "description": "Left out for tokens without the `transfer-links:read` scope."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "scope",
                    "type",
                    "name",
                    "description",
                    "enabled",
                    "migrated",
                    "trigger_on_any_condition",
                    "skip_other_rules_when_triggered",
                    "created_at",
                    "updated_at"
                ],
                "title": "RuleResource"
            },
            "RuleScopeEnum": {
                "type": "string",
                "description": "Where a rule runs. `BANK` rules are applied to transactions as they are stored in Synci (changes are permanent) and attach to financial accounts or institutions. `TRANSFER` rules are applied while transactions are transferred to a destination (changes land only in the destination copy) and attach to transfer links. Which destinations a transfer rule fits is derived from its actions, not declared up front.\n",
                "enum": [
                    "BANK",
                    "TRANSFER"
                ],
                "title": "RuleScopeEnum"
            },
            "RuleTypeEnum": {
                "type": "string",
                "description": "The legacy rule type. `BANK` rules are applied to transactions as they are fetched from the bank and can only be attached to financial accounts. The transfer link types are applied while transactions are transferred to the destination and can only be attached to transfer links.\n| |\n|---|\n| `BANK` <br/> Applied to bank transactions as they are fetched. Attaches to financial accounts. |\n| `YNAB_TRANSFER_LINK` <br/> Applied while transferring transactions to a YNAB budget account. |\n| `LUNCH_MONEY_TRANSFER_LINK` <br/> Applied while transferring transactions to a Lunch Money account. |\n| `GOOGLE_SHEETS_TRANSFER_LINK` <br/> Applied while transferring transactions to a Google Sheet. |\n| `NOTION_TRANSFER_LINK` <br/> Applied while transferring transactions to a Notion database. |",
                "enum": [
                    "BANK",
                    "YNAB_TRANSFER_LINK",
                    "LUNCH_MONEY_TRANSFER_LINK",
                    "GOOGLE_SHEETS_TRANSFER_LINK",
                    "NOTION_TRANSFER_LINK"
                ],
                "title": "RuleTypeEnum"
            },
            "SelectConnectionSetupAccountsRequest": {
                "type": "object",
                "properties": {
                    "account_ids": {
                        "type": "array",
                        "description": "The accounts to keep enabled on the connection. Every other account the provider found is disabled\nand nothing is fetched for it. At least one account must be kept.",
                        "examples": [
                            [
                                1234567890,
                                1234567891
                            ]
                        ],
                        "items": {
                            "type": "integer"
                        },
                        "uniqueItems": true
                    }
                },
                "required": [
                    "account_ids"
                ],
                "title": "SelectConnectionSetupAccountsRequest"
            },
            "SignConventionEnum": {
                "type": "string",
                "description": "How a CSV expresses the direction of an amount: one signed column, separate debit and credit columns, a minus after the digits (\"123,45-\"), or a single column where money out is positive.\n",
                "enum": [
                    "SIGNED",
                    "DEBIT_CREDIT_COLUMNS",
                    "TRAILING_MINUS",
                    "DEBIT_POSITIVE"
                ],
                "title": "SignConventionEnum"
            },
            "SimpleFinAccountResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string",
                        "description": "The Synci financial account Actual has been syncing."
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name of the financial account."
                    },
                    "still_shared": {
                        "type": "string",
                        "description": "Whether the account is still part of the connection's exposed\nselection (always true under all_accounts). False means Actual\nsynced it in the past but the account has since been\ndeselected \u2014 Actual will show an error for it until unlinked\nthere."
                    },
                    "first_pulled_at": {
                        "type": "string",
                        "description": "When Actual first synced this account."
                    },
                    "last_pulled_at": {
                        "type": "string",
                        "description": "When Actual last synced this account. Unlinking inside Actual\nsends no signal, so a stale value may mean unlinked or simply\nnot synced recently."
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "name",
                    "still_shared",
                    "first_pulled_at",
                    "last_pulled_at"
                ],
                "title": "SimpleFinAccountResource"
            },
            "SimpleFinAppEnum": {
                "type": "string",
                "description": "Which SimpleFIN-consuming app a connection was created for. This is pure presentation metadata: it drives the card, icon, and setup guide shown to the user, and never changes the protocol behavior. Every consumer gets an identical setup token and the same /simplefin/accounts output.\n",
                "enum": [
                    "actual_budget",
                    "other"
                ],
                "title": "SimpleFinAppEnum"
            },
            "SimpleFinConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name for the connection."
                    },
                    "app": {
                        "type": "string",
                        "description": "Which SimpleFIN app this connection is for (drives the card/icon\nand setup guide the UI shows). Protocol behavior is identical\nacross apps."
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether the connection is enabled. Disabled connections reject pulls."
                    },
                    "status": {
                        "type": "string",
                        "description": "Lifecycle status: pending (waiting for the token to be claimed),\nexpired (setup token lapsed unclaimed), claimed (Actual holds\nactive credentials), or revoked (credentials invalidated)."
                    },
                    "setup_token": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The one-time SimpleFIN setup token to paste into Actual's\n\"Link bank account with SimpleFIN\" flow. Only present while the\nconnection is pending; claiming or regeneration replaces it.\nNull for third-party applications and for anyone but the owner."
                    },
                    "setup_token_expires_at": {
                        "type": "string"
                    },
                    "claimed_at": {
                        "type": "string",
                        "description": "When Actual claimed the setup token in exchange for credentials."
                    },
                    "revoked_at": {
                        "type": "string",
                        "description": "When the access credentials were revoked, if ever."
                    },
                    "last_pulled_at": {
                        "type": "string",
                        "description": "When Actual last pulled account data from Synci."
                    },
                    "all_accounts": {
                        "type": "boolean",
                        "description": "Whether every financial account (including future ones) is\nexposed. When true, financial_accounts is not authoritative and\nis returned empty; the account set is resolved at pull time."
                    },
                    "financial_accounts": {
                        "description": "IDs of the financial accounts exposed to Actual Budget. Empty\nwhen all_accounts is true.",
                        "anyOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "accounts": {
                        "type": "array",
                        "description": "Accounts Actual has been observed syncing (informational; see\nthe accounts sub-endpoint). Present when loaded.",
                        "items": {
                            "$ref": "#/components/schemas/SimpleFinAccountResource"
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "app",
                    "enabled",
                    "status",
                    "setup_token",
                    "setup_token_expires_at",
                    "claimed_at",
                    "revoked_at",
                    "last_pulled_at",
                    "all_accounts",
                    "financial_accounts",
                    "created_at",
                    "updated_at"
                ],
                "title": "SimpleFinConnectionResource"
            },
            "StoreGoogleSheetRequest": {
                "type": "object",
                "properties": {
                    "mode": {
                        "type": "string",
                        "description": "Use \"create\" to have Synci create a new spreadsheet in the\nconnected Google Drive, or \"attach\" to register an existing\nspreadsheet you own.",
                        "enum": [
                            "create",
                            "attach"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional display name for the spreadsheet in Synci. Defaults to\nthe spreadsheet title.",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Title for the new spreadsheet. Only used when mode is \"create\".",
                        "maxLength": 255
                    },
                    "spreadsheet_id": {
                        "type": "string",
                        "description": "The ID of the spreadsheet to attach, as found in its URL.\nRequired when mode is \"attach\".",
                        "pattern": "^[A-Za-z0-9_-]{20,100}$",
                        "examples": [
                            "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
                        ]
                    },
                    "header_config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Optional ordered list of transaction field keys to use as\nspreadsheet columns. Omit to use the default columns.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "synci.account_id",
                                "synci.account_name",
                                "counterparty_account",
                                "entry_type",
                                "mapped.date",
                                "mapped.payee",
                                "mapped.description",
                                "amount",
                                "currency",
                                "booked",
                                "booking_date",
                                "booking_datetime",
                                "value_date",
                                "value_datetime",
                                "balance_after_transaction",
                                "additional_information",
                                "additional_information_structured",
                                "additional_data_structured",
                                "creditor.name",
                                "creditor.iban",
                                "creditor.bban",
                                "creditor.id",
                                "creditor.pan",
                                "creditor.masked_pan",
                                "creditor.msisdn",
                                "creditor.currency",
                                "creditor.agent",
                                "debtor.name",
                                "debtor.iban",
                                "debtor.bban",
                                "debtor.pan",
                                "debtor.masked_pan",
                                "debtor.msisdn",
                                "debtor.currency",
                                "debtor.agent",
                                "ultimate_creditor",
                                "ultimate_debtor",
                                "remittance_information.unstructured",
                                "remittance_information.structured",
                                "remittance_information.unstructured_array",
                                "remittance_information.structured_array",
                                "codes.bank_transaction_code",
                                "codes.merchant_category_code",
                                "codes.proprietary_bank_transaction_code",
                                "codes.purpose_code",
                                "currency_exchange.source_currency",
                                "currency_exchange.exchange_rate",
                                "currency_exchange.unit_currency",
                                "currency_exchange.target_currency",
                                "currency_exchange.quotation_date",
                                "currency_exchange.contract_identification",
                                "external_identifiers.institution_transaction_id",
                                "external_identifiers.integrator_transaction_id",
                                "external_identifiers.end_to_end_id",
                                "external_identifiers.entry_reference",
                                "external_identifiers.check_id",
                                "external_identifiers.mandate_id",
                                "enriched.counterparty_name",
                                "enriched.category_general",
                                "enriched.is_subscription",
                                "enriched.is_personal"
                            ]
                        }
                    }
                },
                "required": [
                    "mode"
                ],
                "title": "StoreGoogleSheetRequest"
            },
            "StoreImportBatchRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "The statement file: camt.053 (XML), OFX/QFX or CSV, at most 10 MB."
                    }
                },
                "required": [
                    "file"
                ],
                "title": "StoreImportBatchRequest"
            },
            "StoreNotionDatabaseRequest": {
                "type": "object",
                "properties": {
                    "mode": {
                        "type": "string",
                        "description": "Use \"create\" to have Synci create a new database under a page you\nshared with Synci, or \"attach\" to register an existing database.",
                        "enum": [
                            "create",
                            "attach"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional display name for the database in Synci. Defaults to the\ndatabase's title in Notion.",
                        "maxLength": 255
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Title for the new database. Only used when mode is \"create\".",
                        "maxLength": 255
                    },
                    "parent_page_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The Notion page to create the database under. Required when mode is\n\"create\" unless the connection was set up from the Synci template.",
                        "pattern": "^[0-9a-fA-F]{32}$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                        "examples": [
                            "59833787-2cf9-4fdf-8782-e53db20768a5"
                        ]
                    },
                    "data_source_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The Notion data source (database table) to attach. Required when\nmode is \"attach\".",
                        "pattern": "^[0-9a-fA-F]{32}$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                        "examples": [
                            "59833787-2cf9-4fdf-8782-e53db20768a5"
                        ]
                    },
                    "header_config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Optional ordered list of transaction field keys to write as\ndatabase properties. Omit to use the default set.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "synci.account_id",
                                "synci.account_name",
                                "counterparty_account",
                                "entry_type",
                                "mapped.date",
                                "mapped.payee",
                                "mapped.description",
                                "amount",
                                "currency",
                                "booked",
                                "booking_date",
                                "booking_datetime",
                                "value_date",
                                "value_datetime",
                                "balance_after_transaction",
                                "additional_information",
                                "additional_information_structured",
                                "additional_data_structured",
                                "creditor.name",
                                "creditor.iban",
                                "creditor.bban",
                                "creditor.id",
                                "creditor.pan",
                                "creditor.masked_pan",
                                "creditor.msisdn",
                                "creditor.currency",
                                "creditor.agent",
                                "debtor.name",
                                "debtor.iban",
                                "debtor.bban",
                                "debtor.pan",
                                "debtor.masked_pan",
                                "debtor.msisdn",
                                "debtor.currency",
                                "debtor.agent",
                                "ultimate_creditor",
                                "ultimate_debtor",
                                "remittance_information.unstructured",
                                "remittance_information.structured",
                                "remittance_information.unstructured_array",
                                "remittance_information.structured_array",
                                "codes.bank_transaction_code",
                                "codes.merchant_category_code",
                                "codes.proprietary_bank_transaction_code",
                                "codes.purpose_code",
                                "currency_exchange.source_currency",
                                "currency_exchange.exchange_rate",
                                "currency_exchange.unit_currency",
                                "currency_exchange.target_currency",
                                "currency_exchange.quotation_date",
                                "currency_exchange.contract_identification",
                                "external_identifiers.institution_transaction_id",
                                "external_identifiers.integrator_transaction_id",
                                "external_identifiers.end_to_end_id",
                                "external_identifiers.entry_reference",
                                "external_identifiers.check_id",
                                "external_identifiers.mandate_id",
                                "enriched.counterparty_name",
                                "enriched.category_general",
                                "enriched.is_subscription",
                                "enriched.is_personal"
                            ]
                        }
                    }
                },
                "required": [
                    "mode"
                ],
                "title": "StoreNotionDatabaseRequest"
            },
            "StoreSimpleFinConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the connection.",
                        "maxLength": 255
                    },
                    "app": {
                        "anyOf": [
                            {
                                "description": "Which SimpleFIN app this connection is for (drives the card,\nicon, and setup guide; no effect on protocol behavior).",
                                "$ref": "#/components/schemas/SimpleFinAppEnum"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "all_accounts": {
                        "type": "boolean",
                        "description": "Expose every financial account the user owns, including ones\nconnected in the future. When true, financial_accounts is ignored."
                    },
                    "financial_accounts": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "IDs of the financial accounts to expose.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the connection is enabled. Disabled connections reject pulls."
                    }
                },
                "title": "StoreSimpleFinConnectionRequest"
            },
            "SuggestRuleRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": "integer",
                        "description": "The account the rule will be attached to. The examples must be on this account."
                    },
                    "transaction_ids": {
                        "type": "array",
                        "description": "One to ten example transactions on that account that are moves to the counterparty account.",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1,
                        "maxItems": 10,
                        "uniqueItems": true
                    },
                    "counterparty_financial_account_id": {
                        "type": "integer",
                        "description": "The user's own account on the other side of the move. Must differ from `financial_account_id`."
                    }
                },
                "required": [
                    "financial_account_id",
                    "transaction_ids",
                    "counterparty_financial_account_id"
                ],
                "title": "SuggestRuleRequest"
            },
            "SyncFinancialAccountRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "anyOf": [
                            {
                                "description": "The type of data to sync. If not specified, all data will be synced.",
                                "$ref": "#/components/schemas/BankDataTypeEnum"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "from_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date from which to sync data. If not specified, the from_date will be set to the last sync date, or sync start date if no sync has been performed yet."
                    }
                },
                "title": "SyncFinancialAccountRequest"
            },
            "TestWebhookRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Optional financial account to build the test payload from.\nWhen omitted, sample data is sent instead."
                    },
                    "event": {
                        "description": "The event type to send to the endpoint.",
                        "$ref": "#/components/schemas/WebhookEventTypeEnum"
                    }
                },
                "required": [
                    "event"
                ],
                "title": "TestWebhookRequest"
            },
            "TransactionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string"
                    },
                    "financial_account": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/FinancialAccountResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "failed_transfers": {
                        "type": "string",
                        "description": "The number of failed transfer attempts for this transaction. Left out for tokens without the `transfer-links:read` scope."
                    },
                    "attempted_transfers": {
                        "type": "string",
                        "description": "The number of attempted transfer paths for this transaction. Left out for tokens without the `transfer-links:read` scope."
                    },
                    "amount": {
                        "type": "string",
                        "description": "The amount of the transaction as billed to the account."
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code."
                    },
                    "booked": {
                        "type": "string",
                        "description": "Whether the transaction is booked (cleared) or not. If false, the transaction is pending."
                    },
                    "counterparty": {
                        "type": "object",
                        "description": "The user's own account on the other side of this transaction, when it is an internal transfer. Always present; nulls when no counterparty is set.",
                        "properties": {
                            "financial_account_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The Synci financial account on the other side, set by a rule or by hand. Null for an app the user did not share that account with."
                            },
                            "transaction_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The transaction on the counterparty account this one is paired with. Null under the same condition."
                            },
                            "pairing_status": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "PENDING while the other side is awaited, PAIRED once found, EXPIRED when none arrived in time."
                            }
                        },
                        "required": [
                            "financial_account_id",
                            "transaction_id",
                            "pairing_status"
                        ]
                    },
                    "origin": {
                        "description": "Who wrote the row: PROVIDER (a bank sync), MANUAL (the user, through this API), RULE (a rule side effect), MODEL (the loan model: interest, fees, scheduled payments), ADJUSTMENT (a balance checkpoint) or IMPORT (a statement file the user imported).",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    "PROVIDER"
                                ]
                            }
                        ]
                    },
                    "import_batch_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The import batch an IMPORT row (or the adjustment an import posted) came in with. Null elsewhere."
                    },
                    "entry_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "On a manual loan account: OPENING, PAYMENT, INTEREST, FEE, ADJUSTMENT or SCHEDULED_PAYMENT. Null elsewhere."
                    },
                    "source_transaction_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The bank transaction a generated loan row was posted for. Null for an app the user did not share the paying account with."
                    },
                    "mapped_fields": {
                        "description": "User-friendly fields mapped by Synci based on the financial account configuration."
                    },
                    "trade": {
                        "type": "object",
                        "description": "Brokerage / investment-specific fields. Populated only for\ntransactions on INVESTMENT-category accounts (provided by SnapTrade);\nomitted from the response for bank transactions.\nRequest via `?include=trade` to include this field.",
                        "properties": {
                            "activity_type": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Activity classification \u2014 BUY / SELL / DIVIDEND / INTEREST /\nCONTRIBUTION / WITHDRAWAL / TRANSFER / FEE / TAX /\nSTOCK_DIVIDEND / STOCK_SPLIT / OTHER."
                            },
                            "units": {
                                "type": "string",
                                "description": "Quantity of the security traded."
                            },
                            "price_per_unit": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "description": "Effective per-unit price at trade time, in this transaction's\nown currency (|amount| / units). Null on transfers of assets\nbetween accounts, which carry no price."
                            },
                            "fees": {
                                "type": "string",
                                "description": "Broker commission / fees applied to this trade."
                            },
                            "fx_rate": {
                                "type": "string",
                                "description": "Foreign-exchange rate when the trade settled in a different\ncurrency than the activity's reported currency. Null otherwise."
                            },
                            "external_reference_id": {
                                "type": "string",
                                "description": "Broker-side reference id (distinct from `external_identifiers.integrator_transaction_id`,\nwhich is SnapTrade's own id). Useful for end-user reconciliation against\nbroker statements."
                            },
                            "instrument": {
                                "type": "object",
                                "description": "The security traded.",
                                "properties": {
                                    "symbol": {
                                        "type": "string",
                                        "description": "Ticker (e.g. \"AAPL\", \"BTC\")."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Human-readable security name (e.g. \"Apple Inc.\")."
                                    },
                                    "exchange": {
                                        "type": "string",
                                        "description": "Exchange where the security trades (e.g. \"NASDAQ\", \"NYSE\")."
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Asset class \u2014 STOCK / ETF / OPTION / CRYPTOCURRENCY /\nFIXED_INCOME / MUTUAL_FUND / OTHER."
                                    },
                                    "figi_code": {
                                        "type": "string",
                                        "description": "FIGI (Financial Instrument Global Identifier), the\ncross-exchange unique id for the security."
                                    }
                                },
                                "required": [
                                    "symbol",
                                    "name",
                                    "exchange",
                                    "type",
                                    "figi_code"
                                ]
                            },
                            "option": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "description": "Option-specific fields. Null unless the trade is an options trade.",
                                "properties": {
                                    "ticker": {
                                        "type": "string",
                                        "description": "Full OCC option contract symbol (e.g. \"AAPL250620C00200000\")."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "CALL or PUT."
                                    },
                                    "strike_price": {
                                        "type": "string"
                                    },
                                    "expiration_date": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "underlying_symbol": {
                                        "type": "string",
                                        "description": "Ticker of the underlying security."
                                    }
                                },
                                "required": [
                                    "ticker",
                                    "type",
                                    "strike_price",
                                    "expiration_date",
                                    "underlying_symbol"
                                ]
                            }
                        },
                        "required": [
                            "activity_type",
                            "units",
                            "price_per_unit",
                            "fees",
                            "fx_rate",
                            "external_reference_id",
                            "instrument",
                            "option"
                        ]
                    },
                    "enriched": {
                        "type": "object",
                        "description": "Enriched transaction data (merchant, category, logo). Request via `?include=enriched` to include this field.",
                        "properties": {
                            "provider": {
                                "type": "string"
                            },
                            "counterparty": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "logo_url": {
                                        "type": "string"
                                    },
                                    "website": {
                                        "type": "string"
                                    },
                                    "mccs": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name",
                                    "logo_url",
                                    "website",
                                    "mccs"
                                ]
                            },
                            "intermediary": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "logo_url": {
                                        "type": "string"
                                    },
                                    "website": {
                                        "type": "string"
                                    },
                                    "mccs": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name",
                                    "logo_url",
                                    "website",
                                    "mccs"
                                ]
                            },
                            "category_general": {
                                "type": "string"
                            },
                            "location": {
                                "type": "object",
                                "properties": {
                                    "raw_address": {
                                        "type": "string"
                                    },
                                    "google_maps_url": {
                                        "type": "string"
                                    },
                                    "apple_maps_url": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "raw_address",
                                    "google_maps_url",
                                    "apple_maps_url"
                                ]
                            },
                            "certainty_score": {
                                "type": "string"
                            },
                            "is_subscription": {
                                "type": "string"
                            },
                            "is_personal": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "provider",
                            "counterparty",
                            "intermediary",
                            "category_general",
                            "location",
                            "certainty_score",
                            "is_subscription",
                            "is_personal"
                        ]
                    },
                    "booking_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The date when an entry is posted to an account on the financial institutions books."
                    },
                    "booking_datetime": {
                        "type": "string",
                        "description": "The date and time when an entry is posted to an account on the financial institutions books."
                    },
                    "value_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The date at which assets become available to the account owner in case of a credit."
                    },
                    "value_datetime": {
                        "type": "string",
                        "description": "The date and time at which assets become available to the account owner in case of a credit."
                    },
                    "debtor": {
                        "type": "object",
                        "description": "Information about the debtor of the transaction.",
                        "properties": {
                            "name": {
                                "type": "string",
                                "description": "Name of the debtor if a \"Credited\" transaction."
                            },
                            "bban": {
                                "type": "string"
                            },
                            "iban": {
                                "type": "string"
                            },
                            "pan": {
                                "type": "string"
                            },
                            "masked_pan": {
                                "type": "string"
                            },
                            "msisdn": {
                                "type": "string"
                            },
                            "currency": {
                                "type": "string"
                            },
                            "agent": {
                                "type": "string"
                            }
                        }
                    },
                    "creditor": {
                        "type": "object",
                        "description": "Information about the creditor of the transaction.",
                        "properties": {
                            "name": {
                                "type": "string",
                                "description": "Name of the creditor if a \"Debited\" transaction."
                            },
                            "bban": {
                                "type": "string"
                            },
                            "iban": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string",
                                "description": "Identification of creditor, e.g. a SEPA Creditor ID."
                            },
                            "pan": {
                                "type": "string"
                            },
                            "masked_pan": {
                                "type": "string"
                            },
                            "msisdn": {
                                "type": "string"
                            },
                            "currency": {
                                "type": "string"
                            },
                            "agent": {
                                "type": "string"
                            }
                        }
                    },
                    "ultimate_debtor": {
                        "type": "string"
                    },
                    "ultimate_creditor": {
                        "type": "string"
                    },
                    "remittance_information": {
                        "type": "object",
                        "properties": {
                            "structured": {
                                "type": "string",
                                "description": "Reference as contained in the structured remittance reference structure."
                            },
                            "structured_array": {
                                "type": "string",
                                "description": "Array of reference as contained in the structured remittance reference structure."
                            },
                            "unstructured": {
                                "type": "string"
                            },
                            "unstructured_array": {
                                "type": "string"
                            }
                        }
                    },
                    "additional_data_structured": {
                        "type": "string",
                        "description": "An umbrella datapoint used for information that is outside of Berlin Group specification, such as bank- or country-specific fields."
                    },
                    "additional_information": {
                        "type": "string",
                        "description": "Might be used by the financial institution to transport additional transaction related information."
                    },
                    "additional_information_structured": {
                        "type": "string"
                    },
                    "balance_after_transaction": {
                        "type": "string",
                        "description": "The account balance after this transaction. Recommended balance type is INTERIM_BOOKED."
                    },
                    "codes": {
                        "type": "object",
                        "properties": {
                            "bank_transaction_code": {
                                "type": "string",
                                "description": "Institution transaction code as used by the financial institution and using the sub elements of this structured code defined by ISO20022. For standing order reports the following codes are applicable: \"PMNT-ICDT-STDO\" for credit transfers, \"PMNT-IRCT-STDO\" for instant credit transfers, \"PMNT-ICDT-XBST\" for cross-border credit transfers, \"PMNT-IRCT-XBST\" for cross-border real time credit transfers, \"PMNT-MCOP-OTHR\" for specific standing orders which have a dynamical amount to move left funds e.g. on month end to a saving account."
                            },
                            "merchant_category_code": {
                                "type": "string",
                                "description": "Merchant category code as defined by card issuer."
                            },
                            "proprietary_bank_transaction_code": {
                                "type": "string",
                                "description": "Proprietary bank transaction code as used within a community or within a financial institution."
                            },
                            "purpose_code": {
                                "type": "string"
                            }
                        }
                    },
                    "currency_exchange": {
                        "type": "object",
                        "description": "Currency exchange information for transactions with foreign currencies.",
                        "properties": {
                            "source_currency": {
                                "type": "string"
                            },
                            "exchange_rate": {
                                "type": "string"
                            },
                            "unit_currency": {
                                "type": "string"
                            },
                            "target_currency": {
                                "type": "string"
                            },
                            "quotation_date": {
                                "type": "string"
                            },
                            "contract_identification": {
                                "type": "string",
                                "description": "The bank's reference for the FX contract. A bank-side identifier like those under `external_identifiers`, so omitted with them."
                            }
                        }
                    },
                    "external_identifiers": {
                        "type": "object",
                        "description": "Identifiers of the transaction not provided by Synci.",
                        "properties": {
                            "institution_transaction_id": {
                                "type": "string",
                                "description": "Transaction identifier provided by the bank/financial institution."
                            },
                            "integrator_transaction_id": {
                                "type": "string",
                                "description": "Transaction identifier given by the bank integrator."
                            },
                            "end_to_end_id": {
                                "type": "string",
                                "description": "Unique end to end ID."
                            },
                            "entry_reference": {
                                "type": "string",
                                "description": "The identification of the transaction as used for reference given by the financial institution."
                            },
                            "check_id": {
                                "type": "string",
                                "description": "Identification of a cheque."
                            },
                            "mandate_id": {
                                "type": "string",
                                "description": "Identification of mandates, e.g. a SEPA Mandate ID."
                            }
                        }
                    },
                    "transfer_logs": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLogResource"
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "amount",
                    "currency",
                    "booked",
                    "counterparty",
                    "origin",
                    "import_batch_id",
                    "entry_type",
                    "source_transaction_id",
                    "mapped_fields",
                    "booking_date",
                    "booking_datetime",
                    "value_date",
                    "value_datetime",
                    "created_at",
                    "updated_at"
                ],
                "title": "TransactionResource"
            },
            "TransactionTypeEnum": {
                "type": "string",
                "enum": [
                    "BANK",
                    "YNAB"
                ],
                "title": "TransactionTypeEnum"
            },
            "TransferLinkResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "financial_account_id": {
                        "type": "string",
                        "description": "The ID of the financial account transactions are being transferred from."
                    },
                    "financial_account": {
                        "description": "The associated FinancialAccount resource. Will be included in the response if the `include` query parameter contains `financial_account`.",
                        "$ref": "#/components/schemas/FinancialAccountResource"
                    },
                    "destination_type": {
                        "type": "string",
                        "description": "The type of destination the transfer link sends transactions to:\n- **YNAB**: a YNAB budget account.\n- **LUNCH_MONEY**: a Lunch Money account.\n- **GOOGLE_SHEETS**: a Google Sheet.\n- **NOTION**: a Notion database."
                    },
                    "destination_id": {
                        "type": "string",
                        "description": "The ID of the destination transactions are being transferred to. The type of resource the ID refers to depends on the destination type:\n- **YNAB**: the ID of a YNAB budget account.\n- **LUNCH_MONEY**: the ID of a Lunch Money account.\n- **GOOGLE_SHEETS**: the ID of a Google Sheet.\n- **NOTION**: the ID of a Notion database."
                    },
                    "destination": {
                        "description": "The associated destination resource. Will be included in the response if the `include` query parameter contains `destination`.",
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/YnabBudgetAccountResource"
                            },
                            {
                                "$ref": "#/components/schemas/LunchMoneyAccountResource"
                            },
                            {
                                "$ref": "#/components/schemas/GoogleSheetResource"
                            },
                            {
                                "$ref": "#/components/schemas/NotionDatabaseResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "transfer_start_date": {
                        "type": "string",
                        "description": "The date from which the transfer link will start transferring transactions.\nIf not provided, all available transactions in the attached financial account will be transferred regardless of their date.",
                        "examples": [
                            "2025-01-01"
                        ]
                    },
                    "active": {
                        "type": "string",
                        "description": "Whether the transfer link is enabled."
                    },
                    "sync_mode": {
                        "type": "string",
                        "description": "Which streams to push to the destination:\n- `transactions`: only individual transactions (default for bank sources)\n- `balance`: only periodic balance snapshots\n- `transactions_and_balance`: both (default for brokerage / crypto sources)"
                    },
                    "on_booked_change": {
                        "type": "object",
                        "description": "Which destination fields to update when a transaction's booked status changes.\nIf not provided, all fields will be updated.",
                        "properties": {
                            "update_status": {
                                "type": "string"
                            },
                            "update_payee": {
                                "type": "string"
                            },
                            "update_description": {
                                "type": "string"
                            },
                            "update_amount": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "update_status",
                            "update_payee",
                            "update_description",
                            "update_amount"
                        ]
                    },
                    "rules": {
                        "type": "array",
                        "description": "The rules attached to the transfer link. Will be included in the response if the `include` query parameter contains `rules`.\nEach object includes:\n- order: The position of the rule in the transfer link's rule list. Rules are applied in ascending order.\n- rule: The rule resource data",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order": {
                                    "type": "integer"
                                },
                                "rule": {
                                    "type": "object",
                                    "additionalProperties": {}
                                }
                            },
                            "required": [
                                "order",
                                "rule"
                            ]
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "financial_account_id",
                    "destination_type",
                    "destination_id",
                    "transfer_start_date",
                    "active",
                    "sync_mode",
                    "on_booked_change",
                    "created_at",
                    "updated_at"
                ],
                "title": "TransferLinkResource"
            },
            "TransferLinkSyncModeEnum": {
                "type": "string",
                "description": "Which data streams a transfer link pushes to its destination.\n| |\n|---|\n| `TRANSACTIONS` <br/> Push individual transactions only. |\n| `BALANCE` <br/> Push periodic balance snapshots only. |\n| `TRANSACTIONS_AND_BALANCE` <br/> Push both transactions and balance snapshots. |",
                "enum": [
                    "TRANSACTIONS",
                    "BALANCE",
                    "TRANSACTIONS_AND_BALANCE"
                ],
                "title": "TransferLinkSyncModeEnum"
            },
            "TransferLogResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "transfer_link_id": {
                        "type": "string",
                        "description": "The ID of the transfer link that the transaction was transferred through."
                    },
                    "transfer_link": {
                        "description": "The associated transfer link resource. Will be included in the response if the `include` query parameter contains `transfer_link`.",
                        "$ref": "#/components/schemas/TransferLinkResource"
                    },
                    "transaction_id": {
                        "type": "string",
                        "description": "The ID of the transaction that was transferred."
                    },
                    "transaction": {
                        "description": "The associated transaction resource. Will be included in the response if the `include` query parameter contains `transaction`.",
                        "$ref": "#/components/schemas/TransactionResource"
                    },
                    "destination_transaction_id": {
                        "type": "string",
                        "description": "The ID of the transaction that was created in the destination, as assigned by the destination."
                    },
                    "status": {
                        "type": "string",
                        "description": "The status of the transfer attempt."
                    },
                    "message": {
                        "type": "string",
                        "description": "Additional details about the transfer attempt, for example an error message if the transfer failed."
                    },
                    "undone_at": {
                        "type": "string",
                        "description": "The date and time the transfer was undone, if it has been undone."
                    },
                    "undone_log_id": {
                        "type": "string",
                        "description": "If this log is the result of an undo action, this will contain the ID of the original log."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "transfer_link_id",
                    "transaction_id",
                    "destination_transaction_id",
                    "status",
                    "message",
                    "undone_at",
                    "undone_log_id",
                    "created_at",
                    "updated_at"
                ],
                "title": "TransferLogResource"
            },
            "UpdateFinancialAccountRequest": {
                "type": "object",
                "properties": {
                    "config": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The financial account's configuration",
                        "properties": {
                            "map_fields": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "description": "Which field(s) to use when mapping the \"payee\", \"description\" and \"date\" fields for a transaction.\nFor most cases, AUTO is the best option. Version 2 of the API replaces these fixed options with\nordered fallback chains; an account configured with a chain that has no equivalent here reads as AUTO.",
                                "properties": {
                                    "payee": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "AUTO",
                                            "NONE",
                                            "CREDITOR_NEGATIVE_DEBTOR_POSITIVE",
                                            "DEBTOR_NEGATIVE_CREDITOR_POSITIVE",
                                            "DEBTOR_NAME",
                                            "CREDITOR_NAME",
                                            "REMITTANCE_INFORMATION_STRUCTURED",
                                            "REMITTANCE_INFORMATION_UNSTRUCTURED",
                                            "REMITTANCE_INFORMATION_STRUCTURED_ARRAY",
                                            "REMITTANCE_INFORMATION_UNSTRUCTURED_ARRAY",
                                            "ADDITIONAL_INFORMATION",
                                            "ADDITIONAL_INFORMATION_STRUCTURED",
                                            "ADDITIONAL_DATA_STRUCTURED",
                                            null
                                        ],
                                        "examples": [
                                            "CREDITOR_NAME"
                                        ]
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "AUTO",
                                            "NONE",
                                            "CREDITOR_NEGATIVE_DEBTOR_POSITIVE",
                                            "DEBTOR_NEGATIVE_CREDITOR_POSITIVE",
                                            "DEBTOR_NAME",
                                            "CREDITOR_NAME",
                                            "REMITTANCE_INFORMATION_STRUCTURED",
                                            "REMITTANCE_INFORMATION_UNSTRUCTURED",
                                            "REMITTANCE_INFORMATION_STRUCTURED_ARRAY",
                                            "REMITTANCE_INFORMATION_UNSTRUCTURED_ARRAY",
                                            "ADDITIONAL_INFORMATION",
                                            "ADDITIONAL_INFORMATION_STRUCTURED",
                                            "ADDITIONAL_DATA_STRUCTURED",
                                            null
                                        ],
                                        "examples": [
                                            "REMITTANCE_INFORMATION_UNSTRUCTURED"
                                        ]
                                    },
                                    "date": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "AUTO",
                                            "BOOKING_DATE",
                                            "VALUE_DATE",
                                            null
                                        ],
                                        "examples": [
                                            "BOOKING_DATE"
                                        ]
                                    }
                                }
                            },
                            "sync_start_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "The date to start syncing transactions from. Cannot be earlier than the date the connection was authorized minus the connection's `max_historical_days`.\nWill default to today if not set.",
                                "examples": [
                                    "2025-01-01"
                                ]
                            },
                            "sync_auto": {
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "description": "Whether data should be synced automatically. If set to false, you will need to manually trigger a sync every time you want to refresh data."
                            },
                            "sync_pending_transactions": {
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "description": "Whether pending transactions should be synced. For some banks, setting this to true can cause duplicate transactions."
                            },
                            "pending_settlement_matching": {
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "description": "Whether a booked transaction can settle an existing pending transaction when the amount changed.\nCard pre-authorizations (fuel stations, hotels, car rentals) are often authorized with a placeholder amount\nthat changes when the transaction is booked, together with the transaction's identifiers.\nWhen enabled, a booked transaction that matches a pending transaction's counterparty (and card details,\nwhen the bank provides them) within `pending_settlement_max_days` days updates that pending transaction\ninstead of creating a duplicate.\nOnly pending transactions are matched this way; deduplication of booked transactions is unaffected.\nEnabled by default.",
                                "examples": [
                                    true
                                ]
                            },
                            "pending_settlement_max_days": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The maximum number of days between a pending transaction and its booked settlement\nfor `pending_settlement_matching` to link the two. Card settlements usually complete\nwithin a few days. Must be between 1 and 14. Defaults to 7.",
                                "examples": [
                                    7
                                ],
                                "minimum": 1,
                                "maximum": 14
                            },
                            "fuzzy_counterparty_matching": {
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "description": "Whether a counterparty name the bank re-words when a transaction settles can still match\nthe pending entry it replaces. Banks truncate the name to fit a fixed-width field and append\ndetail the pending entry never carried, so \"NORWEGIAN.COM\" can settle as \"NORWEGIAN.C 3284405123\".\nWhen the booked and pending copies of one transaction arrive in the same sync, that rename\nleaves the pending copy matching nothing and it is stored as a duplicate.\nWhen enabled, descriptors that align as a truncation or an extension of one another are\ntreated as the same counterparty, provided they align on at least `fuzzy_counterparty_min_chars`\ncharacters. Descriptors that conflict (`AMAZON 123` against `AMAZON 456`) never align.\nOnly pending transactions are matched this way; deduplication of booked transactions is unaffected.\nEnabled by default.",
                                "examples": [
                                    true
                                ]
                            },
                            "fuzzy_counterparty_min_chars": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The minimum number of characters two re-worded counterparty descriptors must align on for\n`fuzzy_counterparty_matching` to treat them as the same party. Raise it for banks whose\ndescriptors are short enough that distinct merchants collide. Must be between 1 and 60.\nDefaults to 6.",
                                "examples": [
                                    6
                                ],
                                "minimum": 1,
                                "maximum": 60
                            },
                            "sync_balances": {
                                "type": [
                                    "boolean",
                                    "null"
                                ],
                                "description": "Whether balances should be synced."
                            },
                            "sync_frequency_in_minutes": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "How often to sync data in minutes. The permitted minimum is set by the user's plan\n(`max_sync_frequency_minutes`); 30 is only the absolute lower bound any plan could set.",
                                "minimum": 30,
                                "maximum": 1440
                            },
                            "fields_for_duplicate_filtering": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "description": "An array of Transaction fields to use when filtering duplicate transactions.\nWhen a new transaction is synced, these fields are compared with existing transactions.\nIf the fields are identical, the new transaction is considered a duplicate and will be ignored.\nThis should only be used if you are struggling with duplicate transactions, and know which fields can be used to filter them. For everyone else, omit this field.",
                                "examples": [
                                    null
                                ],
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "amount",
                                        "currency",
                                        "booked",
                                        "booking_date",
                                        "booking_datetime",
                                        "value_date",
                                        "value_datetime",
                                        "ultimate_debtor",
                                        "ultimate_creditor",
                                        "additional_data_structured",
                                        "additional_information",
                                        "additional_information_structured",
                                        "balance_after_transaction",
                                        "debtor.name",
                                        "debtor.bban",
                                        "debtor.iban",
                                        "debtor.pan",
                                        "debtor.masked_pan",
                                        "debtor.msisdn",
                                        "debtor.currency",
                                        "debtor.agent",
                                        "creditor.name",
                                        "creditor.bban",
                                        "creditor.iban",
                                        "creditor.id",
                                        "creditor.pan",
                                        "creditor.masked_pan",
                                        "creditor.msisdn",
                                        "creditor.currency",
                                        "creditor.agent",
                                        "remittance_information.structured",
                                        "remittance_information.unstructured",
                                        "remittance_information.structured_array",
                                        "remittance_information.unstructured_array",
                                        "codes.bank_transaction_code",
                                        "codes.merchant_category_code",
                                        "codes.proprietary_bank_transaction_code",
                                        "codes.purpose_code",
                                        "currency_exchange.source_currency",
                                        "currency_exchange.exchange_rate",
                                        "currency_exchange.unit_currency",
                                        "currency_exchange.target_currency",
                                        "currency_exchange.quotation_date",
                                        "currency_exchange.contract_identification",
                                        "external_identifiers.institution_transaction_id",
                                        "external_identifiers.integrator_transaction_id",
                                        "external_identifiers.end_to_end_id",
                                        "external_identifiers.entry_reference",
                                        "external_identifiers.check_id",
                                        "external_identifiers.mandate_id"
                                    ]
                                }
                            },
                            "enrichment": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ],
                                        "description": "Whether transaction enrichment is enabled"
                                    },
                                    "provider": {
                                        "anyOf": [
                                            {
                                                "description": "The provider to use for transaction enrichment.",
                                                "$ref": "#/components/schemas/EnrichmentProviderEnum"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The country where transactions are made. Providing a country significantly improves enrichment accuracy.",
                                        "minLength": 2,
                                        "maxLength": 2
                                    }
                                }
                            }
                        }
                    },
                    "bic": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Institution Identifier Code (BIC/SWIFT code).",
                        "maxLength": 255
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the account, as assigned by the financial institution.",
                        "maxLength": 255
                    },
                    "custom_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Custom name for the account, as defined by the end user.",
                        "maxLength": 255
                    },
                    "institution_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The lender's name on a manual account (\"L\u00e5nekassen\"). Omit to keep it, send null or blank to clear it. Provider accounts cannot set one.",
                        "maxLength": 100
                    },
                    "display_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Name of the account as defined by the end user within online channels.",
                        "maxLength": 255
                    },
                    "bban": {
                        "type": "string",
                        "description": "Basic Bank Account Number (BBAN). Must be provided if IBAN is not provided.",
                        "maxLength": 255
                    },
                    "iban": {
                        "type": "string",
                        "description": "International Bank Account Number (IBAN). Must be provided if BBAN is not provided.",
                        "maxLength": 255
                    },
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 4217 currency code.",
                        "pattern": "^[A-Z]{3}$",
                        "minLength": 3,
                        "maxLength": 3
                    },
                    "product_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Product Name of the Institution for this account, proprietary definition.",
                        "maxLength": 255
                    },
                    "details": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Specifications that might be provided by the financial institution - characteristics of the account - characteristics of the relevant card.",
                        "maxLength": 255
                    },
                    "owner_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Name of the legal account owner. If there is more than one owner, then e.g. two names might be noted here. For a corporate account, the corporate name is used for this attribute.",
                        "maxLength": 255
                    },
                    "msisdn": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An alias to a payment account via a registered mobile phone number.",
                        "maxLength": 255
                    },
                    "integrator_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The financial account ID provided by the integrator.",
                        "maxLength": 255
                    },
                    "institution_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The financial account ID provided by the institution/bank.",
                        "maxLength": 255
                    }
                },
                "title": "UpdateFinancialAccountRequest"
            },
            "UpdateGoogleSheetRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the spreadsheet in Synci.",
                        "maxLength": 255
                    },
                    "transactions_sheet_gid": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The gid of the tab that receives transactions. Must be sent together\nwith transactions_sheet_name; send both as null to clear."
                    },
                    "transactions_sheet_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The name of the tab that receives transactions. Must be sent together\nwith transactions_sheet_gid.",
                        "maxLength": 255
                    },
                    "live_balance_sheet_gid": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The gid of the tab that holds current balances. Must be sent together\nwith live_balance_sheet_name; send both as null to clear."
                    },
                    "live_balance_sheet_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The name of the tab that holds current balances. Must be sent together\nwith live_balance_sheet_gid.",
                        "maxLength": 255
                    },
                    "balance_history_sheet_gid": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The gid of the tab that records balance history. Must be sent together\nwith balance_history_sheet_name; send both as null to clear."
                    },
                    "balance_history_sheet_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The name of the tab that records balance history. Must be sent together\nwith balance_history_sheet_gid.",
                        "maxLength": 255
                    },
                    "header_config": {
                        "type": "array",
                        "description": "Ordered list of transaction field keys to use as spreadsheet columns.\nChanging this reformats previously synced rows to the new layout.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "synci.account_id",
                                "synci.account_name",
                                "counterparty_account",
                                "entry_type",
                                "mapped.date",
                                "mapped.payee",
                                "mapped.description",
                                "amount",
                                "currency",
                                "booked",
                                "booking_date",
                                "booking_datetime",
                                "value_date",
                                "value_datetime",
                                "balance_after_transaction",
                                "additional_information",
                                "additional_information_structured",
                                "additional_data_structured",
                                "creditor.name",
                                "creditor.iban",
                                "creditor.bban",
                                "creditor.id",
                                "creditor.pan",
                                "creditor.masked_pan",
                                "creditor.msisdn",
                                "creditor.currency",
                                "creditor.agent",
                                "debtor.name",
                                "debtor.iban",
                                "debtor.bban",
                                "debtor.pan",
                                "debtor.masked_pan",
                                "debtor.msisdn",
                                "debtor.currency",
                                "debtor.agent",
                                "ultimate_creditor",
                                "ultimate_debtor",
                                "remittance_information.unstructured",
                                "remittance_information.structured",
                                "remittance_information.unstructured_array",
                                "remittance_information.structured_array",
                                "codes.bank_transaction_code",
                                "codes.merchant_category_code",
                                "codes.proprietary_bank_transaction_code",
                                "codes.purpose_code",
                                "currency_exchange.source_currency",
                                "currency_exchange.exchange_rate",
                                "currency_exchange.unit_currency",
                                "currency_exchange.target_currency",
                                "currency_exchange.quotation_date",
                                "currency_exchange.contract_identification",
                                "external_identifiers.institution_transaction_id",
                                "external_identifiers.integrator_transaction_id",
                                "external_identifiers.end_to_end_id",
                                "external_identifiers.entry_reference",
                                "external_identifiers.check_id",
                                "external_identifiers.mandate_id",
                                "enriched.counterparty_name",
                                "enriched.category_general",
                                "enriched.is_subscription",
                                "enriched.is_personal"
                            ]
                        },
                        "minItems": 1
                    }
                },
                "title": "UpdateGoogleSheetRequest"
            },
            "UpdateGoogleSheetsConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the connection.",
                        "maxLength": 255
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether syncing through this connection is enabled."
                    }
                },
                "title": "UpdateGoogleSheetsConnectionRequest"
            },
            "UpdateImportMappingRequest": {
                "type": "object",
                "properties": {
                    "mapping": {
                        "type": "object",
                        "properties": {
                            "delimiter": {
                                "type": "string",
                                "enum": [
                                    ",",
                                    ";",
                                    "\t",
                                    "|"
                                ]
                            },
                            "encoding": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32
                            },
                            "has_header": {
                                "type": "boolean"
                            },
                            "date_format": {
                                "type": "string",
                                "pattern": "[DMY]",
                                "maxLength": 32
                            },
                            "number_format": {
                                "type": "object",
                                "properties": {
                                    "decimal_separator": {
                                        "type": "string",
                                        "enum": [
                                            ".",
                                            ","
                                        ]
                                    },
                                    "thousands_separator": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "",
                                            ",",
                                            ".",
                                            " ",
                                            "'",
                                            null
                                        ]
                                    },
                                    "sign_convention": {
                                        "$ref": "#/components/schemas/SignConventionEnum"
                                    }
                                },
                                "required": [
                                    "decimal_separator",
                                    "thousands_separator",
                                    "sign_convention"
                                ]
                            },
                            "columns": {
                                "type": "object",
                                "properties": {
                                    "booking_date": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "value_date": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "amount": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "debit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "credit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "description": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "counterparty_name": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "external_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "balance_after": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "currency": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "source_currency": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "status": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 500
                                    },
                                    "counterparty_account": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        },
                        "required": [
                            "delimiter",
                            "has_header",
                            "date_format",
                            "number_format",
                            "columns"
                        ]
                    }
                },
                "required": [
                    "mapping"
                ],
                "title": "UpdateImportMappingRequest"
            },
            "UpdateLoanTermsRequest": {
                "type": "object",
                "properties": {
                    "kind": {
                        "$ref": "#/components/schemas/LoanKindEnum"
                    },
                    "repayment_type": {
                        "$ref": "#/components/schemas/LoanRepaymentTypeEnum"
                    },
                    "fee_per_payment": {
                        "type": "number",
                        "description": "Applies to payments from now on.",
                        "minimum": 0
                    },
                    "day_count": {
                        "description": "Applies to accruals from now on.",
                        "$ref": "#/components/schemas/LoanDayCountEnum"
                    },
                    "original_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "term_months": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 600
                    },
                    "paying_financial_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "A bank account of the loan's owner that pays the loan; null switches to schedule mode (set `schedule`)."
                    },
                    "schedule": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Schedule mode; null turns it off (set `paying_financial_account_id`).",
                        "properties": {
                            "amount": {
                                "type": "number"
                            },
                            "day_of_month": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 31
                            }
                        }
                    }
                },
                "title": "UpdateLoanTermsRequest"
            },
            "UpdateLunchMoneyConnectionRequest": {
                "type": "object",
                "properties": {
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether syncing through this connection is enabled."
                    },
                    "access_token": {
                        "type": "string",
                        "description": "Provide a new Lunch Money API access token to rotate credentials.\nThe token is validated before the connection is updated."
                    }
                },
                "title": "UpdateLunchMoneyConnectionRequest"
            },
            "UpdateNotionConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the connection.",
                        "maxLength": 255
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether syncing through this connection is enabled."
                    }
                },
                "title": "UpdateNotionConnectionRequest"
            },
            "UpdateNotionDatabaseRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the database in Synci.",
                        "maxLength": 255
                    },
                    "header_config": {
                        "type": "array",
                        "description": "Ordered list of transaction field keys to write as database\nproperties. New properties are added to the Notion database;\nexisting properties are never removed.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "synci.account_id",
                                "synci.account_name",
                                "counterparty_account",
                                "entry_type",
                                "mapped.date",
                                "mapped.payee",
                                "mapped.description",
                                "amount",
                                "currency",
                                "booked",
                                "booking_date",
                                "booking_datetime",
                                "value_date",
                                "value_datetime",
                                "balance_after_transaction",
                                "additional_information",
                                "additional_information_structured",
                                "additional_data_structured",
                                "creditor.name",
                                "creditor.iban",
                                "creditor.bban",
                                "creditor.id",
                                "creditor.pan",
                                "creditor.masked_pan",
                                "creditor.msisdn",
                                "creditor.currency",
                                "creditor.agent",
                                "debtor.name",
                                "debtor.iban",
                                "debtor.bban",
                                "debtor.pan",
                                "debtor.masked_pan",
                                "debtor.msisdn",
                                "debtor.currency",
                                "debtor.agent",
                                "ultimate_creditor",
                                "ultimate_debtor",
                                "remittance_information.unstructured",
                                "remittance_information.structured",
                                "remittance_information.unstructured_array",
                                "remittance_information.structured_array",
                                "codes.bank_transaction_code",
                                "codes.merchant_category_code",
                                "codes.proprietary_bank_transaction_code",
                                "codes.purpose_code",
                                "currency_exchange.source_currency",
                                "currency_exchange.exchange_rate",
                                "currency_exchange.unit_currency",
                                "currency_exchange.target_currency",
                                "currency_exchange.quotation_date",
                                "currency_exchange.contract_identification",
                                "external_identifiers.institution_transaction_id",
                                "external_identifiers.integrator_transaction_id",
                                "external_identifiers.end_to_end_id",
                                "external_identifiers.entry_reference",
                                "external_identifiers.check_id",
                                "external_identifiers.mandate_id",
                                "enriched.counterparty_name",
                                "enriched.category_general",
                                "enriched.is_subscription",
                                "enriched.is_personal"
                            ]
                        },
                        "minItems": 1
                    }
                },
                "title": "UpdateNotionDatabaseRequest"
            },
            "UpdateRuleRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The name of the rule.",
                        "maxLength": 64
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An optional description of what the rule does.",
                        "maxLength": 192
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the rule is active. Disabled rules are not applied."
                    },
                    "actions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "The ID of an existing action to update."
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The value the action sets. Supports plain strings or Liquid templates for dynamic expressions."
                                }
                            }
                        }
                    }
                },
                "title": "UpdateRuleRequest"
            },
            "UpdateSimpleFinConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Display name for the connection.",
                        "maxLength": 255
                    },
                    "app": {
                        "anyOf": [
                            {
                                "description": "Which SimpleFIN app this connection is for (presentation only).",
                                "$ref": "#/components/schemas/SimpleFinAppEnum"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "all_accounts": {
                        "type": "boolean",
                        "description": "Expose every financial account the user owns, including ones\nconnected in the future. When true, financial_accounts is ignored."
                    },
                    "financial_accounts": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "IDs of the financial accounts to expose. Changes take effect on\nthe consumer's next pull.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the connection is enabled. Disabled connections reject pulls."
                    }
                },
                "title": "UpdateSimpleFinConnectionRequest"
            },
            "UpdateTransactionRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": "integer",
                        "description": "The ID of the financial account this transaction belongs to. Scoped\nto the caller's own accounts so a transaction can't be reassigned\ninto another user's account."
                    },
                    "counterparty_financial_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The user's own account on the other side of this transaction (an internal transfer). Setting it runs\nthe pairing search on that account; `null` clears the counterparty and any pairing. Cannot be the\ntransaction's own account."
                    },
                    "counterparty_transaction_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pair this transaction with a specific transaction on the counterparty account by hand (for example an\nFX move the automatic search cannot match). The target must sit on the counterparty account, carry the\nopposite sign and be unpaired. `null` unpairs both sides; the counterparty account is kept."
                    },
                    "amount": {
                        "type": "number",
                        "description": "The amount of the transaction as billed to the account."
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO 4217 currency code.",
                        "pattern": "^[A-Z]{3}$",
                        "minLength": 3,
                        "maxLength": 3
                    },
                    "booking_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The date when an entry is posted to an account on the financial institutions books. **Booking date is required if value date is not provided.**"
                    },
                    "booking_datetime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date and time when an entry is posted to an account on the financial institutions books."
                    },
                    "value_date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "The date at which assets become available to the account owner in case of a credit. **Value date is required if booking date is not provided.**"
                    },
                    "value_datetime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date and time at which assets become available to the account owner in case of a credit."
                    },
                    "booked": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the transaction is booked (cleared) or not. If false, the transaction is pending."
                    },
                    "debtor": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the debtor if a \"Credited\" transaction."
                            },
                            "bban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "iban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "masked_pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "msisdn": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agent": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "creditor": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the creditor if a \"Debited\" transaction."
                            },
                            "bban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "iban": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of creditor, e.g. a SEPA Creditor ID."
                            },
                            "pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "masked_pan": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "msisdn": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agent": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "ultimate_debtor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ultimate_creditor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "remittance_information": {
                        "type": "object",
                        "properties": {
                            "structured": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Reference as contained in the structured remittance reference structure."
                            },
                            "structured_array": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "description": "Array of reference as contained in the structured remittance reference structure.",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "unstructured": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "unstructured_array": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "additional_data_structured": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An umbrella datapoint used for information that is outside of Berlin Group specification, such as bank- or country-specific fields."
                    },
                    "additional_information": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Might be used by the financial institution to transport additional transaction related information."
                    },
                    "additional_information_structured": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "balance_after_transaction": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "The account balance after this transaction. Recommended balance type is INTERIM_BOOKED."
                    },
                    "codes": {
                        "type": "object",
                        "properties": {
                            "bank_transaction_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Institution transaction code as used by the financial institution and using the sub elements of this structured code defined by ISO20022. For standing order reports the following codes are applicable: \"PMNT-ICDT-STDO\" for credit transfers, \"PMNT-IRCT-STDO\" for instant credit transfers, \"PMNT-ICDT-XBST\" for cross-border credit transfers, \"PMNT-IRCT-XBST\" for cross-border real time credit transfers, \"PMNT-MCOP-OTHR\" for specific standing orders which have a dynamical amount to move left funds e.g. on month end to a saving account."
                            },
                            "merchant_category_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Merchant category code as defined by card issuer."
                            },
                            "proprietary_bank_transaction_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Proprietary bank transaction code as used within a community or within a financial institution."
                            },
                            "purpose_code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "currency_exchange": {
                        "type": "object",
                        "properties": {
                            "source_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "exchange_rate": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "unit_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "target_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "quotation_date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "contract_identification": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "external_identifiers": {
                        "type": "object",
                        "properties": {
                            "integrator_transaction_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Transaction identifier given by the bank integrator."
                            },
                            "institution_transaction_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Transaction identifier provided by the bank/financial institution."
                            },
                            "end_to_end_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Unique end to end ID."
                            },
                            "entry_reference": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The identification of the transaction as used for reference given by the financial institution."
                            },
                            "check_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of a cheque."
                            },
                            "mandate_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Identification of mandates, e.g. a SEPA Mandate ID."
                            }
                        }
                    }
                },
                "title": "UpdateTransactionRequest"
            },
            "UpdateTransferLinkRequest": {
                "type": "object",
                "properties": {
                    "financial_account_id": {
                        "type": "integer",
                        "description": "The ID of the financial account transactions are being transferred from."
                    },
                    "destination_type": {
                        "description": "The type of destination the transfer link sends transactions to:\n- **YNAB**: a YNAB budget account.\n- **LUNCH_MONEY**: a Lunch Money account.\n- **GOOGLE_SHEETS**: a Google Sheet.",
                        "$ref": "#/components/schemas/DestinationTypeEnum"
                    },
                    "destination_id": {
                        "type": "integer",
                        "description": "The ID of the destination transactions should be transferred to. Required when `destination_type` is provided. The type of resource the ID refers to depends on the destination type:\n- **YNAB**: the ID of a YNAB budget account.\n- **LUNCH_MONEY**: the ID of a Lunch Money account.\n- **GOOGLE_SHEETS**: the ID of a Google Sheet."
                    },
                    "transfer_start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The date from which the transfer link will start transferring transactions.\nIf not provided, all available transactions in the attached financial account will be transferred regardless of their date.",
                        "examples": [
                            "2025-01-01"
                        ]
                    },
                    "on_booked_change": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Which destination fields to update when a transaction's booked status changes.\nIf not provided, all fields will be updated.",
                        "properties": {
                            "update_status": {
                                "type": "boolean"
                            },
                            "update_payee": {
                                "type": "boolean"
                            },
                            "update_description": {
                                "type": "boolean"
                            },
                            "update_amount": {
                                "type": "boolean"
                            }
                        }
                    },
                    "active": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the transfer link is active."
                    },
                    "sync_mode": {
                        "anyOf": [
                            {
                                "description": "Which streams to push to the destination:\n- `transactions`: only individual transactions\n- `balance`: only periodic balance snapshots\n- `transactions_and_balance`: both\n\n| |\n|---|\n| `TRANSACTIONS` <br/> Push individual transactions only. |\n| `BALANCE` <br/> Push periodic balance snapshots only. |\n| `TRANSACTIONS_AND_BALANCE` <br/> Push both transactions and balance snapshots. |",
                                "$ref": "#/components/schemas/TransferLinkSyncModeEnum"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "title": "UpdateTransferLinkRequest"
            },
            "UpdateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "The HTTPS URL that will receive event deliveries.",
                        "maxLength": 512
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional label to help you identify the endpoint.",
                        "maxLength": 255
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether the endpoint receives deliveries. Re-enabling is subject\nto your plan's limit on active endpoints."
                    },
                    "events": {
                        "type": "array",
                        "description": "The event types this endpoint should receive. Canonical names:\n`transactions.created`, `transactions.updated`, `balance.updated`,\n`holdings.updated`, `account.created`, `account.updated`,\n`account.deleted`. Legacy aliases (`bank_account.created`,\n`bank_account.updated`, `bank_account.deleted`) are accepted but\ncannot be mixed in the same array with their canonical counterparts.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "transactions.created",
                                "transactions.updated",
                                "balance.updated",
                                "holdings.updated",
                                "account.created",
                                "account.updated",
                                "account.deleted",
                                "account.backfill.completed",
                                "bank_account.created",
                                "bank_account.updated",
                                "bank_account.deleted",
                                "connection.created",
                                "connection.activated",
                                "connection.reauthorized",
                                "connection.expiring",
                                "connection.expired",
                                "connection.failing",
                                "connection.recovered",
                                "connection.disabled",
                                "connection.deleted",
                                "connection.backfill.completed"
                            ]
                        },
                        "minItems": 1
                    },
                    "financial_accounts": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Limit deliveries to these financial account IDs. Omit or pass\nnull to receive events for every account your token can access.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "type": {
                        "description": "`WEBHOOK` for a standard endpoint, `ZAPIER` for an endpoint used\nwith the Zapier integration, or `N8N` for an endpoint registered\nby the Synci n8n trigger node.",
                        "$ref": "#/components/schemas/WebhookTypeEnum"
                    },
                    "omit_sensitive_identifiers": {
                        "description": "When true, sensitive account identifiers (IBAN/BBAN) are omitted\nfrom delivered payloads, and IBANs written into transaction text\nare replaced with `[hidden: account number]`. Must be true for\nZapier endpoints.",
                        "enum": [
                            "yes",
                            "on",
                            "1",
                            1,
                            "true",
                            true
                        ]
                    }
                },
                "title": "UpdateWebhookEndpointRequest"
            },
            "UpdateYnabBudgetRequest": {
                "type": "object",
                "properties": {
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether syncing to this budget is enabled."
                    }
                },
                "title": "UpdateYnabBudgetRequest"
            },
            "UpdateYnabConnectionRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Display name for the connection.",
                        "maxLength": 255
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Whether syncing through this connection is enabled."
                    }
                },
                "title": "UpdateYnabConnectionRequest"
            },
            "UserProfileResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "email_verified": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "email",
                    "email_verified",
                    "created_at"
                ],
                "title": "UserProfileResource"
            },
            "WebhookEndpointPayloadVersion": {
                "type": "string",
                "description": "Selects the shape of webhook payloads delivered to a given endpoint. - `V1` is the legacy shape. Account-lifecycle events use the     `bank_account.{created,updated,deleted}` event types, and every     payload (including the `transactions.*`, `balance.updated`, and     `holdings.updated` events) embeds the account under the     `bank_account` key. Kept for backwards compatibility with     existing integrations.    - `V2` is the canonical shape. Account-lifecycle events use the     unified `account.*` names and the account is embedded under the     `financial_account` key. New endpoints default here.  The payload version is fixed per endpoint when it is created and cannot be changed afterwards.\n",
                "enum": [
                    "v1",
                    "v2"
                ],
                "title": "WebhookEndpointPayloadVersion"
            },
            "WebhookEndpointResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "enabled": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "omit_sensitive_identifiers": {
                        "type": "string"
                    },
                    "events": {
                        "type": "string",
                        "description": "Subscribed event types. New endpoints should use the canonical names\n(`transactions.created`, `transactions.updated`, `balance.updated`,\n`holdings.updated`, `account.created`, `account.updated`, `account.deleted`);\nthe legacy `bank_account.*` aliases are still accepted for existing v1\nintegrations but should not be used in new code."
                    },
                    "financial_accounts": {
                        "type": "string",
                        "description": "IDs of the financial accounts this endpoint receives events for.\nNull or empty means events for all accounts are delivered."
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "secret": {
                        "type": "string",
                        "description": "The endpoint's signing secret. Only returned when the endpoint is\ncreated or the secret is rotated \u2014 store it securely."
                    },
                    "payload_version": {
                        "type": "string",
                        "description": "Shape of payloads delivered to this endpoint. Pinned at creation \u2014\nnot editable after. `v1` is the legacy shape (`bank_account.*`\nevent-type aliases + `bank_account` payload embed key), kept for\nbackwards compatibility with existing integrations. `v2` is the\ncanonical shape (`account.*` events + `financial_account` embed\nkey) \u2014 the default for new endpoints."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "url",
                    "description",
                    "enabled",
                    "type",
                    "omit_sensitive_identifiers",
                    "events",
                    "payload_version",
                    "created_at",
                    "updated_at"
                ],
                "title": "WebhookEndpointResource"
            },
            "WebhookEventResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "event_id": {
                        "type": "string",
                        "description": "Public event identifier (`evt_...`) delivered in the payload's\n`event_id` field. Shared by every delivery attempt of the same\nevent, so it can be used to correlate retries."
                    },
                    "webhook_endpoint_id": {
                        "type": "string"
                    },
                    "webhook_endpoint": {
                        "description": "The endpoint this event was delivered to. Only present when\nrequested via `include=webhook_endpoint`.",
                        "$ref": "#/components/schemas/WebhookEndpointResource"
                    },
                    "event_type": {
                        "type": "string"
                    },
                    "payload": {
                        "type": "string",
                        "description": "The payload that was delivered. Only present when requested via\n`include=payload`."
                    },
                    "status_code": {
                        "type": "string",
                        "description": "HTTP status code returned by the receiving endpoint, if a\nresponse was received."
                    },
                    "error": {
                        "type": "string",
                        "description": "Error message when the delivery failed."
                    },
                    "attempt": {
                        "type": "string",
                        "description": "Delivery attempt number for this event."
                    },
                    "success": {
                        "type": "string",
                        "description": "Whether the delivery succeeded."
                    },
                    "sensitive_identifiers_omitted": {
                        "type": "string",
                        "description": "Whether sensitive account identifiers (IBAN/BBAN) were omitted\nfrom the delivered payload."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "event_id",
                    "webhook_endpoint_id",
                    "event_type",
                    "status_code",
                    "error",
                    "attempt",
                    "success",
                    "sensitive_identifiers_omitted",
                    "created_at",
                    "updated_at"
                ],
                "title": "WebhookEventResource"
            },
            "WebhookEventTypeEnum": {
                "type": "string",
                "description": "Webhook event types Synci can emit. The three account-lifecycle events were renamed from `bank_account.*` to `account.*`, and the payload embed key from `bank_account` to `financial_account`. The legacy `bank_account.*` event names remain available so existing integrations keep working \u2014 endpoints with `payload_version=v1` receive the legacy variant.  The other events (`transactions.*`, `balance.updated`, `holdings.updated`) have the same event-type string in both versions; only the payload embed key differs between v1 and v2.\n",
                "enum": [
                    "transactions.created",
                    "transactions.updated",
                    "balance.updated",
                    "holdings.updated",
                    "account.created",
                    "account.updated",
                    "account.deleted",
                    "account.backfill.completed",
                    "bank_account.created",
                    "bank_account.updated",
                    "bank_account.deleted",
                    "connection.created",
                    "connection.activated",
                    "connection.reauthorized",
                    "connection.expiring",
                    "connection.expired",
                    "connection.failing",
                    "connection.recovered",
                    "connection.disabled",
                    "connection.deleted",
                    "connection.backfill.completed",
                    "portal.user.verified"
                ],
                "title": "WebhookEventTypeEnum"
            },
            "WebhookTypeEnum": {
                "type": "string",
                "description": "The kind of webhook endpoint. `WEBHOOK` is a standard HTTPS endpoint; `ZAPIER` marks an endpoint used with the Zapier integration, which must have `omit_sensitive_identifiers` enabled; `N8N` marks an endpoint registered by the Synci n8n trigger node. n8n runs on infrastructure the user controls, so unlike Zapier it keeps the default privacy setting.\n",
                "enum": [
                    "WEBHOOK",
                    "ZAPIER",
                    "N8N"
                ],
                "title": "WebhookTypeEnum"
            },
            "YnabBudgetAccountResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "budget_id": {
                        "type": "string"
                    },
                    "budget": {
                        "$ref": "#/components/schemas/YnabBudgetResource"
                    },
                    "ynab_id": {
                        "type": "string",
                        "description": "The account's ID in YNAB."
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "on_budget": {
                        "type": "string",
                        "description": "Whether the account is on budget in YNAB."
                    },
                    "closed": {
                        "type": "string",
                        "description": "Whether the account is closed in YNAB."
                    },
                    "note": {
                        "type": "string",
                        "description": "The account note from YNAB, if set."
                    },
                    "balance": {
                        "type": "string",
                        "description": "The account balance as reported by YNAB."
                    },
                    "cleared_balance": {
                        "type": "string",
                        "description": "The cleared balance as reported by YNAB."
                    },
                    "uncleared_balance": {
                        "type": "string",
                        "description": "The uncleared balance as reported by YNAB."
                    },
                    "transfer_payee_id": {
                        "type": "string",
                        "description": "The YNAB payee ID used for transfers to this account."
                    },
                    "direct_import_linked": {
                        "type": "string",
                        "description": "Whether the account is linked to YNAB Direct Import."
                    },
                    "last_reconciled_at": {
                        "type": "string",
                        "description": "When the account was last reconciled in YNAB."
                    },
                    "transfer_links": {
                        "type": "array",
                        "description": "Left out for tokens without the `transfer-links:read` scope.",
                        "items": {
                            "$ref": "#/components/schemas/TransferLinkResource"
                        }
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "budget_id",
                    "ynab_id",
                    "name",
                    "type",
                    "on_budget",
                    "closed",
                    "note",
                    "balance",
                    "cleared_balance",
                    "uncleared_balance",
                    "transfer_payee_id",
                    "direct_import_linked",
                    "last_reconciled_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "YnabBudgetAccountResource"
            },
            "YnabBudgetResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "connection_id": {
                        "type": "string"
                    },
                    "connection": {
                        "$ref": "#/components/schemas/YnabConnectionResource"
                    },
                    "ynab_id": {
                        "type": "string",
                        "description": "The budget's ID in YNAB."
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether syncing to this budget is enabled."
                    },
                    "name": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string",
                        "description": "The budget's currency in YNAB."
                    },
                    "first_month": {
                        "type": "string",
                        "description": "The budget's first month in YNAB."
                    },
                    "last_month": {
                        "type": "string",
                        "description": "The budget's last month in YNAB."
                    },
                    "accounts": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/YnabBudgetAccountResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "connection_id",
                    "ynab_id",
                    "enabled",
                    "name",
                    "currency",
                    "first_month",
                    "last_month",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "YnabBudgetResource"
            },
            "YnabConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "health": {
                        "$ref": "#/components/schemas/HealthResource"
                    },
                    "enabled": {
                        "type": "string",
                        "description": "Whether syncing through this connection is enabled."
                    },
                    "auth_url": {
                        "type": "string",
                        "description": "URL to authorize the connection with YNAB. Only present when authorization is required."
                    },
                    "sync_balances": {
                        "type": "string",
                        "description": "Whether account balances are synced to YNAB."
                    },
                    "ynab_user_id": {
                        "type": "string",
                        "description": "The connected user's ID in YNAB."
                    },
                    "budgets": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/YnabBudgetResource"
                        }
                    },
                    "last_synced_at": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "enabled",
                    "sync_balances",
                    "ynab_user_id",
                    "last_synced_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "YnabConnectionResource"
            }
        },
        "responses": {
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}