Ledger and usage
Every read, change and refusal, and what this month has used.
The FolioLedgerPage object
Attributes
head_keysrequired Type:object[]entriesrequired Type:object[]next_beforerequired Type:integernull
Read the ledger
GET /folio/ledger
Needs folio:audit:read: Read the folio ledger
The hash-chained event ledger, newest first. It holds who, what, where and why, never document content. Reading it is itself ledgered (ledger.read). head_keys lists the public key of every stamp that signed one of the organisation's ledger heads (more than one after a move to another region). They come from the same database as the heads, so do not trust them as served: check each against the published key of the stamp it names (GET /folio/head-key on that region's host) before giving it to the offline verifier.
Parameters
actorqueryoptional Type:stringactionqueryoptional Type:stringAn action prefix, such as
record.orsearch.run.targetqueryoptional Type:stringA record id, or a folder and everything under it.
fromqueryoptional Type:integerUnix milliseconds, inclusive.
toqueryoptional Type:integerUnix milliseconds, exclusive.
beforequeryoptional Type:integerThe previous page's
next_before.limitqueryoptional Type:integer
Returns
200Type:FolioLedgerPageA page of ledger entries400Type:Probleminvalid_request,invalid_version,idempotency_key_requiredorinvalid_signature401Type:Problemunauthorized403Type:Problempermission_denied,org_suspended, oraddress_not_allowed(your organisation only accepts requests from the addresses it has listed)404Type:Problemnot_found421Type:Problemwrong_region429Type:Problemrate_limitedorquota_exceededdefaultType:Probleminternal
curl "https://api.unforged.sh/folio/ledger" \
-H "Authorization: Bearer $UNFORGED_KEY" \
-H "Unforged-Version: 2026-10-14" import requests
r = requests.get(
"https://api.unforged.sh/folio/ledger",
headers={"Authorization": f"Bearer {UNFORGED_KEY}", "Unforged-Version": "2026-10-14"},
)
print(r.json()) const res = await fetch('https://api.unforged.sh/folio/ledger', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.UNFORGED_KEY}`, 'Unforged-Version': '2026-10-14' },
});
console.log(await res.json()); This month's usage
GET /folio/usage
Needs org:read: See org, members, usage
This month's usage by item, the storage held per profile, the download allowance and a forecast. Amounts are null (a placeholder) until prices are set.
Returns
200This month's usage401Type:Problemunauthorized403Type:Problempermission_denied,org_suspended, oraddress_not_allowed(your organisation only accepts requests from the addresses it has listed)404Type:Problemnot_found421Type:Problemwrong_region429Type:Problemrate_limitedorquota_exceededdefaultType:Probleminternal
curl "https://api.unforged.sh/folio/usage" \
-H "Authorization: Bearer $UNFORGED_KEY" \
-H "Unforged-Version: 2026-10-14" import requests
r = requests.get(
"https://api.unforged.sh/folio/usage",
headers={"Authorization": f"Bearer {UNFORGED_KEY}", "Unforged-Version": "2026-10-14"},
)
print(r.json()) const res = await fetch('https://api.unforged.sh/folio/usage', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.UNFORGED_KEY}`, 'Unforged-Version': '2026-10-14' },
});
console.log(await res.json()); This month's usage as CSV
GET /folio/usage.csv
Needs org:read: See org, members, usage
The same month as CSV; it reconciles with the usage lines.
Returns
200This month's usage as CSV401Type:Problemunauthorized403Type:Problempermission_denied,org_suspended, oraddress_not_allowed(your organisation only accepts requests from the addresses it has listed)404Type:Problemnot_found421Type:Problemwrong_region429Type:Problemrate_limitedorquota_exceededdefaultType:Probleminternal
curl "https://api.unforged.sh/folio/usage.csv" \
-H "Authorization: Bearer $UNFORGED_KEY" \
-H "Unforged-Version: 2026-10-14" import requests
r = requests.get(
"https://api.unforged.sh/folio/usage.csv",
headers={"Authorization": f"Bearer {UNFORGED_KEY}", "Unforged-Version": "2026-10-14"},
)
print(r.json()) const res = await fetch('https://api.unforged.sh/folio/usage.csv', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.UNFORGED_KEY}`, 'Unforged-Version': '2026-10-14' },
});
console.log(await res.json()); This stamp's published head key
GET /folio/head-key
No API key needed
The public key this region's stamp signs ledger heads with, and its id. No key needed. A ledger names the keys that signed its heads (head_keys in GET /folio/ledger); check each against the published key of the stamp it names (this route on that region's host) before you trust it, then give them to the offline verifier. 404 where this stamp signs no heads. Limited per client address (429 rate_limited, with Retry-After).
Returns
curl "https://api.unforged.sh/folio/head-key" \
-H "Unforged-Version: 2026-10-14" import requests
r = requests.get(
"https://api.unforged.sh/folio/head-key",
headers={"Unforged-Version": "2026-10-14"},
)
print(r.json()) const res = await fetch('https://api.unforged.sh/folio/head-key', {
method: 'GET',
headers: { 'Unforged-Version': '2026-10-14' },
});
console.log(await res.json());