Accounting Ledger API · ledgers
Let a ledger go, saying why
POST /ledgers/{ledgerId}/disconnect
Let a ledger go, saying why: nothing more is planned for it, journals already there stay, and settings and the map are kept for a reconnect.
Only the ledger's own app (403 NotALedgerApp, NotThisLedgersApp); an uninstalled app's ledgers are let go by accounting itself. Appends accounting.ledger-disconnected. Idempotent by state: a ledger already let go appends nothing.
Access
Requires financials:write.
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
Idempotent by state: a ledger already let go appends nothing.
Why every write carries a key: Idempotency and retries.
Facts appended
accounting.ledger-disconnected
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 -X POST 'https://accounting.getmanifold.io/ledgers/lgr_01a0f6b2-1c00-7f71-8a82-465768798a9b/disconnect' \
-H "Authorization: Bearer $MANIFOLD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"reason": "The merchant disconnected Xero in Apps › Xero."
}'const response = await fetch("https://accounting.getmanifold.io/ledgers/lgr_01a0f6b2-1c00-7f71-8a82-465768798a9b/disconnect", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"reason": "The merchant disconnected Xero in Apps › Xero."
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"reason": "The merchant disconnected Xero in Apps › Xero."
}{
"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": "disconnected",
"settings": {
"granularity": "daily-summary",
"accounts": "map",
"syncFrom": "2026-10-01"
},
"mappings": [
{
"account": "1200",
"externalId": "01a15873-a19f-7e60-9a1d-3f8c2b6e4a10",
"externalCode": "615",
"externalName": "Trade debtors clearing",
"created": false
},
{
"account": "1400",
"externalId": "01a1588b-d641-7a82-8b3f-5a1e4d8c6b32",
"externalCode": "630",
"externalName": "Inventory",
"created": false
},
{
"account": "2200",
"externalId": "01a15892-5a94-7ca4-ad5b-7c3a6f1e8d54",
"externalCode": "820",
"externalName": "GST",
"created": false
},
{
"account": "4000",
"externalId": "01a15858-a1fe-7ec6-8f7d-9e5c8b3a0f76",
"externalCode": "200",
"externalName": "Sales",
"created": false
},
{
"account": "5000",
"externalId": "01a15869-63f8-7fe8-9b9f-1a7e0d5c2b98",
"externalCode": "310",
"externalName": "Cost of Goods Sold",
"created": false
},
{
"account": "2100",
"externalId": "01a15898-dee7-70cc-a208-4e5b60552d26",
"externalCode": "806",
"externalName": "Goods received not invoiced",
"created": false
},
{
"account": "3900",
"externalId": "01a15896-13e8-7708-b853-cd30590fd955",
"externalCode": "975",
"externalName": "Opening balances",
"created": false
}
],
"connectedAt": "2026-10-01T02:14:05.000Z",
"createdAt": "2026-10-01T02:14:05.000Z",
"updatedAt": "2026-10-22T05:02:31.000Z",
"disconnectedAt": "2026-10-22T05:02:31.000Z"
}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
| Refusal | What it means | What 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
| Refusal | What it means | What to do |
|---|---|---|
SubscriptionRequired status | The organization's subscription has lapsed, so writes are refused. | An owner settles billing. Reads still work meanwhile. |
403
| Refusal | What it means | What 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. |
404
| Refusal | What it means | What to do |
|---|---|---|
LedgerNotFound ledgerId | No such record in this organization. | Check the id in the path or the body. |
409
| Refusal | What it means | What to do |
|---|---|---|
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
| Refusal | What it means | What 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.