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

# Get financial connection



## OpenAPI

````yaml /openapi/v1.json get /finance/connections/{connectionId}
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/connections/{connectionId}:
    get:
      tags:
        - Connections
      summary: Get financial connection
      operationId: financial.connections.show
      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:
                          - financial_accounts
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  schemas:
    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
    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
    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
    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
    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
    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
    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
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  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.