Update bank account
update_bank_accountUpdate an existing bank account by id — its name, bank, account number or opening balance. Changing the opening balance regenerates the account's synthetic opening-balance entry. An opening date later than the account's own earliest transaction is refused, unwritten, with code confirm-required until the same call is repeated with confirm true. To add a brand-new account use create_bank_account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ID of the bank account, required for updates | |
| bank | No | Name of the bank | |
| sync | No | Whether automatic bank sync is enabled | |
| hidden | No | Whether the account is hidden/soft-deleted (removes its card; also stops sync) | |
| confirm | No | PROD-1536: required only to save an opening date that is LATER than the account's own earliest transaction. Without it that one case is refused, unwritten, with code confirm-required plus earliesttransactiondate and transactionsbefore, so the caller can show what the date would exclude and let the user override it. | |
| private | No | Whether this is a private account | |
| syncing | No | Whether sync is currently in progress | |
| archived | No | Whether the account is archived | |
| accountid | No | Linked accounting account ID | |
| swiftcode | No | SWIFT/BIC code for international transfers | |
| branchcode | No | Bank branch code or routing number | |
| accountname | No | Name of the bank account | |
| accounttype | No | Type of account (e.g., checking, savings) | |
| openingdate | No | Date of the opening balance | |
| syncenabled | No | Whether this account is enabled for bank sync | |
| accountnumber | No | Bank account number | |
| creditaccount | No | Default credit account ID | |
| creditjournal | No | Default credit journal ID | |
| openingbalance | No | Opening balance for the account | |
| clearopeningbalance | No | PROD-1200: when true, fully REMOVE the opening balance — retracts both openingbalance and openingdate (clears the Insights banner). Distinct from setting the balance to 0, which stays 'set'. |