---
title: "Update a Ledger Template"
method: PUT
path: "/agent-ledger-template/{booksId}/{ledgerId}"
tags: ["Books"]
---

# Update a Ledger Template

`PUT /agent-ledger-template/{booksId}/{ledgerId}`

## Request

- Base URL: `https://api.mercury.com/api/v1`
- URL: `https://api.mercury.com/api/v1/agent-ledger-template/{booksId}/{ledgerId}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

## Path parameters

- `booksId` string, uuid, required
- `ledgerId` string, base58 (max length 22), required: The unique identifier for a Ledger

## Request body

- UpdateLedgerTemplateRequest: Request body for updating a ledger template
  - `name` string, nullable: The name of the ledger.
  - `sort_code` string, nullable: Determines the display order in reports, ordered digit by digit,

## Response `200`

## Other responses

- `400`: Invalid `body`
- `404`: `booksId` or `ledgerId` not found

## Changes

- **2026-10-16** `ab652aa5aa8e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mercurytechnologies/apis/mercury-api/changes/agent-ledger-template/:booksId/:ledgerId/put.md)

---

[API](https://skmtc.dev/mercurytechnologies/apis/mercury-api.md) - [All operations](https://skmtc.dev/mercurytechnologies/apis/mercury-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mercurytechnologies/apis/mercury-api/revisions/ab652aa5aa8e?raw)
