1 Base URL
| Environment | Base URL |
|---|---|
| Local | http://localhost:3000 |
| Production | https://book-keeping.codefusion.com.lk |
All paths below are under /api/v1/…
2 Create an API key
- Sign in as an org admin.
- Create a key with expenses:write (and expenses:read if you need list endpoints).
- Store bk_live_… securely — it is shown once.
curl -sS -X POST "$BASE/api/v1/orgs/$ORG_ID/api-keys" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"label":"n8n","scopes":["expenses:write","expenses:read"]}'3 Authenticate requests
Authorization: Bearer bk_live_YOUR_KEY
# or
X-Api-Key: bk_live_YOUR_KEYOptional attribution: owner_email / owner_id and note / reason / description.