Skip to main content
POST
/
ledgers
Create ledger
curl --request POST \
  --url http://localhost:5001/ledgers \
  --header 'X-blnk-key: <api-key>'
Use blnk.Ledgers.create to create a new ledger for your system.
blnk.Ledgers.create
const response = await blnk.Ledgers.create({
  name: 'Customer wallets',
  meta_data: {
    environment: 'production',
  },
});
FieldTypeDescription
namestringDisplay name for the ledger.
meta_dataobjectOptional metadata for extra context.

Response shape

201 Created
{
  "ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
  "name": "Customer wallets",
  "created_at": "2024-02-20T05:28:03.558281542Z",
  "meta_data": {
    "environment": "production"
  }
}
FieldDescription
ledger_idUnique ID for the ledger. Use this when creating balances and transactions.
nameName you passed in the request.
created_atDate and time the ledger was created.
meta_dataMetadata object, if you sent one.

View ledger docs

Ledger concepts and setup.

Create new ledger

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.