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

# Update investment settings

> Everything on the `investment` object: cash tracking and the paying bank account.



## OpenAPI

````yaml /openapi/v1.json put /finance/accounts/{accountId}/investment
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/accounts/{accountId}/investment:
    put:
      tags:
        - Investments
      summary: Update investment settings
      description: >-
        Everything on the `investment` object: cash tracking and the paying bank
        account.
      operationId: financial.accounts.investment.update
      parameters:
        - name: accountId
          in: path
          required: true
          description: The financial account ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateManualInvestmentTermsRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: Investment settings updated.
                  data:
                    $ref: '#/components/schemas/ManualInvestmentTermsResource'
                required:
                  - message
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateManualInvestmentTermsRequest:
      type: object
      properties:
        cash_tracking_enabled:
          type: boolean
          description: >-
            Turning cash tracking on starts the cash balance at zero today
            unless the account already had one.
        paying_financial_account_id:
          type:
            - integer
            - 'null'
          description: >-
            A bank account of the owner whose counterparty-linked rows post
            deposits and withdrawals; null stops that.
      title: UpdateManualInvestmentTermsRequest
    ManualInvestmentTermsResource:
      type: object
      properties:
        base_currency:
          type:
            - string
            - 'null'
          description: The currency every position is valued in. The account currency.
        cash_tracking_enabled:
          type: boolean
          description: >-
            Whether deposits, withdrawals and the cash legs of trades are
            tracked as a cash balance.
        paying_financial_account_id:
          type:
            - string
            - 'null'
          description: >-
            The bank account whose counterparty-linked rows post deposits and
            withdrawals, or null. Also null for an app the user did not share
            that account with.
        positions_count:
          type: integer
          minimum: 0
        cash_anchor:
          type:
            - object
            - 'null'
          description: >-
            The cash balance the user last stated and the day it was true (end
            of day): rows dated on or before it are already in it. Null when
            cash is not tracked.
          properties:
            balance:
              type: number
            date:
              type: string
          required:
            - balance
            - date
        last_priced_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the account was last valued.
        last_valued_on:
          type:
            - string
            - 'null'
          description: >-
            The last day whose value was computed completely (every held
            position priced and converted). Earlier than today while a close or
            an exchange rate is missing; the figures on `total_balance` are from
            this day.
        history_rebuild:
          type:
            - object
            - 'null'
          description: >-
            The background rebuild of the value history (a position opened in
            the past, a backdated trade). Null when none was ever queued.
            `status` QUEUED, RUNNING, COMPLETED or FAILED; `from` the first day
            being rebuilt. A FAILED rebuild is retried with the rebuild-history
            endpoint.
          properties:
            status:
              type: string
              enum:
                - QUEUED
                - RUNNING
                - COMPLETED
                - FAILED
            from:
              type:
                - string
                - 'null'
            failed_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - status
            - from
            - failed_at
        stale_positions:
          type: array
          description: >-
            Names of positions whose security has had no close for more than
            five trading days; their value is carried forward.
          items:
            type: string
      required:
        - base_currency
        - cash_tracking_enabled
        - paying_financial_account_id
        - positions_count
        - cash_anchor
        - last_priced_at
        - last_valued_on
        - history_rebuild
        - stale_positions
      title: ManualInvestmentTermsResource
  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
    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.