Start here
Core API
Call the Core API on your Blnk instance to record and read ledger data.
The Core API is the HTTP API on your Blnk instance. Ledgers, balances, identities, transactions, reconciliation, search, and hooks in this reference are those routes. A request goes to that instance. Nothing else sits in front of it.
How it works
Your application stores the instance URL and sends each call there. A local install listens at http://localhost:5001. A deployed instance uses the host you gave it.
When secure mode is on, Core checks the X-blnk-key header before it runs the route. The value is your Core API key.
Without secure mode enabled in your configuration, Core accepts the call with no key.
How to use it
Set the base URL
- Self-hosted: On your machine, Core listens at
http://localhost:5001. On a server, use the host andBLNK_SERVER_PORTyou set. The default port is5001. - Blnk Cloud: Open the instance when the status is Connected and copy the Core URL.
Call the route
Send Content-Type: application/json when the request has a body. Pick the route from this reference and send the method and path shown on that page.
curl -X POST "http://localhost:5001/ledgers" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer wallets"
}'The Enterprise API is a separate host. It manages Cloud and self-hosted Enterprise, and it can forward a Core call. Calling Core directly still uses this API and a Core API key.