> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synci.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new transaction

> For most users, this endpoint is not needed. Transactions are normally synced automatically once a financial connection is established.
However, if you want to manually push transactions from some other source that is not integrated with Synci, you can use this endpoint.



## OpenAPI

````yaml /openapi/v1.json post /finance/transactions
openapi: 3.2.0
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
security:
  - oauth2: []
  - http: []
tags:
  - name: Finance
    kind: nav
  - name: Connections
    parent: Finance
  - name: Accounts
    parent: Finance
  - name: Transactions
    parent: Finance
  - name: Institutions
    parent: Finance
  - name: Destinations
    kind: nav
  - name: YNAB
    parent: Destinations
  - name: Lunch Money
    parent: Destinations
  - name: Google Sheets
    parent: Destinations
  - name: SimpleFIN
    parent: Destinations
  - name: Notion
    parent: Destinations
  - name: Account
    kind: nav
  - name: Webhooks
    parent: Account
  - name: User
    parent: Account
  - name: rule-engine
    summary: Rules
    kind: nav
  - name: Rules
    parent: rule-engine
  - name: Rule Logs
    parent: rule-engine
  - name: Transfers
    kind: nav
  - name: Transfer Links
    parent: Transfers
  - name: Transfer Logs
    parent: Transfers
paths:
  /finance/transactions:
    post:
      tags:
        - Transactions
      summary: Create a new transaction
      description: >-
        For most users, this endpoint is not needed. Transactions are normally
        synced automatically once a financial connection is established.

        However, if you want to manually push transactions from some other
        source that is not integrated with Synci, you can use this endpoint.
      operationId: financial.transactions.store
      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'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    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
    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.
        attempted_transfers:
          type: string
          description: The number of attempted transfer paths for this transaction.
        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.
        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

            transactions on INVESTMENT-category accounts (provided by
            SnapTrade);

            omitted from the response for bank transactions.

            Request via `?include=trade` to include this field.
          properties:
            activity_type:
              type:
                - string
                - 'null'
              description: |-
                Activity classification — BUY / SELL / DIVIDEND / INTEREST /
                CONTRIBUTION / WITHDRAWAL / TRANSFER / FEE / TAX /
                STOCK_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
                own currency (|amount| / units). Null on transfers of assets
                between 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
                currency 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`,

                which is SnapTrade's own id). Useful for end-user reconciliation
                against

                broker 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 — STOCK / ETF / OPTION / CRYPTOCURRENCY /
                    FIXED_INCOME / MUTUAL_FUND / OTHER.
                figi_code:
                  type: string
                  description: |-
                    FIGI (Financial Instrument Global Identifier), the
                    cross-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
        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
          items:
            $ref: '#/components/schemas/TransferLogResource'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - financial_account_id
        - amount
        - currency
        - booked
        - mapped_fields
        - booking_date
        - booking_datetime
        - value_date
        - value_datetime
        - created_at
        - updated_at
      title: TransactionResource
    FinancialAccountResource:
      type: object
      properties:
        id:
          type: string
        financial_connection_id:
          type: string
        financial_connection:
          $ref: '#/components/schemas/FinancialConnectionResource'
        config:
          $ref: '#/components/schemas/InstitutionConfigResource'
          description: >-
            The financial account configuration. If the financial account has no
            configuration, the banks default configuration will be used.
        health:
          $ref: '#/components/schemas/HealthResource'
        enabled:
          type: string
        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
            banking providers), INVESTMENT (brokerage), DEPOSIT (cash
            sub-account at a broker), LOC (line of credit). Determines which
            fields are populated on the account.
        raw_type:
          type: string
          description: |-
            Provider's free-form sub-type label (SnapTrade only). Examples:
            "Roth IRA", "TFSA", "Cash". Null for bank accounts.
        cash_balance:
          type:
            - object
            - 'null'
          description: |-
            Uninvested cash held at the broker, for INVESTMENT accounts.
            Null 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
            INVESTMENT accounts. Brokerages report this on the account
            payload rather than as a dated snapshot, so it does not appear
            in 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.
            SnapTrade's `meta.type`/`meta.status` for crypto exchanges).
            Treat as opaque — schema is provider-defined.
        account_number_masked:
          type: string
          description: |-
            Masked account number (e.g. "****1234"). Only present when the
            provider supplies it (SnapTrade brokerages, and banks that report
            a 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.
        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.
        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

            windows are still being fetched this is the earliest date already
            covered;

            transactions before it arrive on subsequent syncs, at the pace the

            institution's daily request allowance permits. Null once the
            account's

            full 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
        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
          items:
            $ref: '#/components/schemas/TransferLinkResource'
        transfer_links_count:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - enabled
        - integrator
        - account_category
        - raw_type
        - cash_balance
        - total_balance
        - meta
        - name
        - custom_name
        - display_name
        - currency
        - product_name
        - cash_account_type
        - account_usage
        - linked_accounts
        - details
        - details_last_synced_at
        - transactions_last_synced_at
        - transactions_backfill_cursor
        - balances_last_synced_at
        - balance
        - created_at
        - updated_at
      title: FinancialAccountResource
    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:
          $ref: '#/components/schemas/TransferLinkResource'
          description: >-
            The associated transfer link resource. Will be included in the
            response if the `include` query parameter contains `transfer_link`.
        transaction_id:
          type: string
          description: The ID of the transaction that was transferred.
        transaction:
          $ref: '#/components/schemas/TransactionResource'
          description: >-
            The associated transaction resource. Will be included in the
            response if the `include` query parameter contains `transaction`.
        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
    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
            by 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

            provider. True for every currently supported provider (GoCardless
            renews PSD2 consent;

            Akahu and SnapTrade re-grant a previously-disabled connection). When
            false, the

            reauthorize 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

            they can manage their existing connections directly with the
            provider. Currently

            true for Akahu (sends them to oauth.akahu.nz where they can add /
            revoke banks

            under 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.

            E.g. if this is set to 180 days, you will have to re-authenticate
            the connection every 180 days.

            Synci 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
            has to be reauthorized, or null for providers that grant enduring
            consent (Akahu, SnapTrade).
        reference:
          type: string
          description: |-
            Caller-supplied correlation id set at creation (e.g. a platform
            developer'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,
            picking a sync start date) is still to be finished. While true the
            accounts exist but their first transaction sync is held back until
            `POST /setup/complete`, or until the setup goes stale. Always false
            for connections created by API clients.
        setup_renewal:
          type: string
          description: >-
            True while a pending setup belongs to a consent renewal rather than
            a new connection: only the

            account 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).
            Null 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
    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.

            One of the fixed option names (`AUTO`, `NONE`, `CREDITOR_NAME`,
            `BOOKING_DATE`, ...).

            Version 2 of the API stores an ordered fallback chain per field
            instead; this is the closest fixed

            option 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
          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`.

            Will 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.

            Card pre-authorizations (fuel stations, hotels, car rentals) are
            often authorized with a placeholder amount

            that changes when the transaction is booked, together with the
            transaction's identifiers.

            When enabled, a booked transaction that matches a pending
            transaction's counterparty (and card details,

            when the bank provides them) within `pending_settlement_max_days`
            days updates that pending transaction

            instead of creating a duplicate.

            Only pending transactions are matched this way; deduplication of
            booked transactions is unaffected.

            Enabled 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

            for `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

            the pending entry it replaces ("NORWEGIAN.COM" settling as
            "NORWEGIAN.C 3284405123").

            Descriptors that conflict rather than truncate or extend never
            match, and only pending

            transactions are matched this way.

            Enabled 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

            `fuzzy_counterparty_matching` to treat them as the same party.
            Defaults to 6; `null` means

            the 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

            subscriber's plan (`max_sync_frequency_minutes` in the plan's
            features, see

            `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

            institution has refused requests on its own daily cap, in which case
            the account

            is 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.

            When a new transaction is synced, these fields are compared with
            existing transactions.

            If the fields are identical, the new transaction is considered a
            duplicate and will be ignored.

            This 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
    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
    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:
          $ref: '#/components/schemas/FinancialAccountResource'
          description: >-
            The associated FinancialAccount resource. Will be included in the
            response if the `include` query parameter contains
            `financial_account`.
        destination_type:
          type: string
          description: |-
            The type of destination the transfer link sends transactions to:
            - **YNAB**: a YNAB budget account.
            - **LUNCH_MONEY**: a Lunch Money account.
            - **GOOGLE_SHEETS**: a Google Sheet.
            - **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:

            - **YNAB**: the ID of a YNAB budget account.

            - **LUNCH_MONEY**: the ID of a Lunch Money account.

            - **GOOGLE_SHEETS**: the ID of a Google Sheet.

            - **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.

            If 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:

            - `transactions`: only individual transactions (default for bank
            sources)

            - `balance`: only periodic balance snapshots

            - `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.

            If 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`.

            Each object includes:

            - order: The position of the rule in the transfer link's rule list.
            Rules are applied in ascending order.

            - 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
    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.

            `null` where the provider imposes no such limit and fetches whatever
            the bank

            holds, 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.

            For most European institutions this ranges from 90 to 180 days.
            `null` where access does not

            expire on a schedule and no periodic re-consent is required, which
            is the case for every US

            institution: 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"]`.

            `null` means the provider does not report it, NOT that the
            institution serves nothing: treat it

            as 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
    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
          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
    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
          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
    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
          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
    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
            (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,

            Categories 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
          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
    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
    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
    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
    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
    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
    AuthorizationException:
      description: Authorization error
      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
  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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.