Accounts
Create and manage the account hierarchy — classes, currencies, balances, entries, and lifecycle.
Accounts are the core of Ledger's model. Each account has a class, one or more currencies, and an optional parent — forming a hierarchy you can roll balances up. Every operation is scoped to your tenant, resolved from your signing credential.
Tenant isolation
The tenant is read from your verified HMAC credential — never from the request body or a path parameter. You can only ever reach your own tenant's accounts.
Create an account
POST /api/v1/ledger/accountsBody fields: class (required), currencies (required array), optional parent,
liquidity_policy, overdraft_limits, and metadata. Returns the created account
with status 201.
List and read
GET /accounts— all accounts for your tenantGET /accounts/{id}— one accountGET /accounts/{id}/children— direct children of an accountGET /accounts/{id}/balances— balances, optionally filtered by?currency=GET /accounts/{id}/entries— entry history, with?currency=and?limit=GET /accounts/{id}/subtree-balance— rolled-up balance across the subtree
Currencies
POST /api/v1/ledger/accounts/{id}/currenciesAdd a currency to an existing account, with an optional overdraft_limit. Returns
the updated account.
Update metadata
PATCH /api/v1/ledger/accounts/{id}Pass { "metadata": { ... } }. Merge semantics: existing keys are preserved, and a
key set to null is cleared. The body's metadata must be a plain object.
Lifecycle
PATCH /accounts/{id}/suspend— suspend an accountPATCH /accounts/{id}/unsuspend— restore a suspended accountPATCH /accounts/{id}/close— close an account
Each returns the updated account.
Holds on an account
POST /api/v1/ledger/accounts/{id}/holdsPlace a hold reserving available balance: body takes currency, amount (integer
string), and optional metadata. Returns the hold with status 201.
GET /accounts/{id}/holds lists holds, filterable by ?currency= and ?state=active.
Amounts are integer strings
Monetary amounts cross the wire as integer strings and are parsed to exact integers at the boundary — never as floating-point numbers, so precision is never lost.
Next
- Transactions — posting balanced entries.
- Holds — releasing a hold.