Skip to main content
POST
/
api
/
ledger
/
v2
/
{ledger}
Create a ledger
curl --request POST \
  --url http://localhost/api/ledger/v2/{ledger} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bucket": "<string>",
  "metadata": {
    "admin": "true"
  },
  "features": {}
}
'
{
  "errorCode": "VALIDATION",
  "errorMessage": "[VALIDATION] invalid 'cursor' query param",
  "details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
}

Documentation Index

Fetch the complete documentation index at: https://docs.formance.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a new ledger. Each ledger is an isolated accounting system with its own accounts, transactions, and balances.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

ledger
string
required

Name of the ledger.

Example:

"ledger001"

Body

application/json
bucket
string
metadata
object
Example:
{ "admin": "true" }
features
object

Response

OK