How to create a new ledger in Blnk.
curl --request POST \
--url http://localhost:5001/ledgers \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Savings Ledger",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}'
{
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"name": "Customer Savings Ledger",
"created_at": "2024-02-20T05:28:03.558281542Z",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}
X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Secure your Blnk server
curl --request POST \
--url http://localhost:5001/ledgers \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Savings Ledger",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}'
{
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"name": "Customer Savings Ledger",
"created_at": "2024-02-20T05:28:03.558281542Z",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}
Was this page helpful?
curl --request POST \
--url http://localhost:5001/ledgers \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Savings Ledger",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}'
{
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"name": "Customer Savings Ledger",
"created_at": "2024-02-20T05:28:03.558281542Z",
"meta_data": {
"project_owner": "Acme LLC",
"description": "For all savings account created & managed by Acme."
}
}