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

# Update ledger account

> Update an existing ledger account.



## OpenAPI

````yaml put /v1/accounting/accounts/{id}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/accounting/accounts/{id}:
    put:
      tags:
        - Accounting > Accounts
      summary: Update ledger account
      description: Update an existing ledger account.
      operationId: updateLedgerAccount
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: Accounting code of the account.
                type:
                  type: string
                  enum:
                    - asset
                    - contra_asset
                    - liability
                    - contra_liability
                    - equity
                    - revenue
                    - contra_revenue
                    - expense
                  description: Accounting type of the account.
                name:
                  type: string
                  description: Display name of the account.
                description:
                  type:
                    - string
                    - 'null'
                  description: Optional description of the account.
                currency:
                  type: string
                  description: ISO 4217 currency used by the account.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingLedgerAccount'
      security:
        - bearer: []
components:
  schemas:
    AccountingLedgerAccount:
      type: object
      properties:
        id:
          type: string
          description: Unique ledger account identifier.
        ledger_id:
          type: string
          description: Owning ledger identifier.
        code:
          type: string
          description: Accounting code of the account.
        type:
          type: string
          enum:
            - asset
            - contra_asset
            - liability
            - contra_liability
            - equity
            - revenue
            - contra_revenue
            - expense
          description: Accounting type of the account.
        is_default:
          type: boolean
          description: Whether the account is a system default.
        name:
          type: string
          description: Display name of the account.
        description:
          type:
            - string
            - 'null'
          description: Optional account description.
        currency:
          type: string
          description: ISO 4217 account currency.
        provider_account_id:
          type:
            - string
            - 'null'
          description: Matching account identifier at the provider.
        client_provider_id:
          type:
            - string
            - 'null'
          description: Connected provider identifier.
        last_refreshed_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp of the last provider refresh.
        balance:
          type: string
          description: Lifetime account balance when requested by a list endpoint.
        period_balance:
          type:
            - string
            - 'null'
          description: Quarter balance when a year and quarter are supplied.
        created_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the account was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the account was last updated.
      required:
        - id
        - ledger_id
        - code
        - type
        - is_default
        - name
        - description
        - currency
        - provider_account_id
        - client_provider_id
        - last_refreshed_at
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````