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

# Update a ledger

> Updates a ledger. Cannot update system ledgers.



## OpenAPI

````yaml PATCH /ledgers/{ledger_id}
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /ledgers/{ledger_id}:
    patch:
      summary: Update a ledger
      description: Updates a ledger. Cannot update system ledgers.
      operationId: update-ledger
      parameters:
        - name: ledger_id
          in: path
          description: Ledger friendly ID (e.g., lgr_abc123def456)
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ledger:
                  type: object
                  properties:
                    name:
                      type: string
                    unit:
                      type: string
                    nexus_asset_category_id:
                      type: integer
            examples:
              Request Example:
                value:
                  ledger:
                    name: Updated Ledger Name
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: lgr_abc123def456
                    name: Updated Ledger Name
                    unit: t
                    system_ledger_type: null
                    partition_type: time
                    cadence: monthly
                    latest_model:
                      id: mdl_abc123def456
                      name: Carbon Calculation Model
                    asset_category: null
                    created_at: '2025-01-15T10:00:00.000Z'
                    updated_at: '2025-01-15T12:00:00.000Z'
        '422':
          description: '422'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 422
                    errors:
                      - message: Cannot modify system ledger
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````