Accounting Ledger API · ledgers

Connect a set of books

PUT /ledgers/{ledgerId}

Connect a set of books, or describe them afresh: only an app, under its own token (403 NotALedgerApp), and only the app that keeps the ledger (403 NotThisLedgersApp).

The id is the app's to derive from the organization, itself and the books' externalId (ledgerIdFor), so a reconnect is the same ledger with its settings and map. The books must be kept in the organization's home currency: baseCurrency, as the provider reports it, is required — books whose currency the provider cannot say are never connected — and in any other is 409 LedgerCurrencyMismatch: Manifold's books are in the home currency and a journal lands in the books' base currency, its amounts in that currency's own minor unit. Appends accounting.ledger-connected. Idempotent by content: books connected as described append nothing.

Access

Requires financials:write.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

Idempotent by content: books connected as described append nothing.

Why every write carries a key: Idempotency and retries.

Facts appended

  • accounting.ledger-connected

What a fact is: Facts and the journal.

AI agent tool

No agent tool. Only the ledger's own app, under its own token, connects its books, maps them, plans and answers their journals (NotALedgerApp for anyone else); an agent sends the merchant to the app's page under Apps instead.

Connecting an agent: AI agents.

Example

curl
curl -X PUT 'https://accounting.getmanifold.io/ledgers/lgr_01a0f6b2-1c00-7f71-8a82-465768798a9b' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "externalId": "01a15897-023d-7b5f-9c7d-2e4f6a8b0c1d",
  "name": "Saltbush Homewares Pty Ltd",
  "baseCurrency": "AUD"
}'
JavaScript (fetch)
const response = await fetch("https://accounting.getmanifold.io/ledgers/lgr_01a0f6b2-1c00-7f71-8a82-465768798a9b", {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "externalId": "01a15897-023d-7b5f-9c7d-2e4f6a8b0c1d",
    "name": "Saltbush Homewares Pty Ltd",
    "baseCurrency": "AUD"
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "externalId": "01a15897-023d-7b5f-9c7d-2e4f6a8b0c1d",
  "name": "Saltbush Homewares Pty Ltd",
  "baseCurrency": "AUD"
}
Response · 200 · application/json
{
  "id": "lgr_01a0f6b2-1c00-7f71-8a82-465768798a9b",
  "appId": "app_85cedb60-f616-4fe5-b9ea-dcd3689b4bc6",
  "externalId": "01a15897-023d-7b5f-9c7d-2e4f6a8b0c1d",
  "name": "Saltbush Homewares Pty Ltd",
  "baseCurrency": "AUD",
  "status": "connected",
  "connectedAt": "2026-10-01T02:14:05.000Z",
  "createdAt": "2026-10-01T02:14:05.000Z",
  "updatedAt": "2026-10-01T02:14:05.000Z",
  "mappings": []
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: accounting-manager.openapi.json. Base URL https://accounting.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
NotALedgerApp Only a ledger app may call this.Call it with the ledger app's token.
NotThisLedgersApp ledgerId This ledger belongs to another app.Call it with the app that connected the ledger.
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

409

RefusalWhat it meansWhat to do
LedgerCurrencyMismatch ledgerId, baseCurrency, homeCurrency The accounting software's base currency is not the organization's home currency.Connect books kept in the home currency.
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again shortly.

How refusals work everywhere: Errors.