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

# Upsert bank account balance

> Creates or updates the opening balance for a bank account. Only one balance per bank account is allowed — subsequent calls update the existing balance.



## OpenAPI

````yaml /openapi-public.json put /v1/bank-accounts/{bankAccountId}/balance
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/bank-accounts/{bankAccountId}/balance:
    put:
      tags:
        - v1 - Bank Accounts
      summary: Upsert bank account balance
      description: >-
        Creates or updates the opening balance for a bank account. Only one
        balance per bank account is allowed — subsequent calls update the
        existing balance.
      operationId: upsertBankAccountBalance
      parameters:
        - name: bankAccountId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: >-
                #/components/schemas/ExternalUpsertBankAccountBalanceRequestV1Model
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalBankAccountBalanceV1Model'
components:
  schemas:
    ExternalUpsertBankAccountBalanceRequestV1Model:
      required:
        - balance
      type: object
      properties:
        balanceAt:
          type: string
          description: >-
            Timestamp of the balance (opening balance date). Defaults to current
            timestamp if not provided.
          format: date-time
          nullable: true
        balance:
          type: integer
          description: Balance amount in minor units (e.g. cents)
          format: int64
    ExternalBankAccountBalanceV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the bank account balance
          format: uuid
        bankAccountId:
          type: string
          description: ID of the bank account
          format: uuid
        balanceAt:
          type: string
          description: Timestamp of the balance (opening balance date)
          format: date-time
        balance:
          type: integer
          description: Balance amount in minor units (e.g. cents)
          format: int64
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````