One-tap bookkeeping with iOS Shortcuts: getting started with the Billbook API
Published
On a busy day, opening the app, picking a category and typing an amount is exactly the moment an entry gets forgotten. The Billbook remote bookkeeping API lets you add an entry straight from iOS Shortcuts, cURL, an automation script or an AI bot, and look up what was logged recently — one tap and it is in the book.
1. Get a personal API token
Sign in to Billbook, open Settings → 🔑 Remote Bookkeeping API and click "Generate token". The plaintext token is shown exactly once, so copy it right away; the server only keeps its SHA-256 hash, and a lost token can only be replaced by rotating it (which invalidates the old one).
Every member — admin, manager or staff — can generate their own token, and entries logged with it are recorded under that member.
2. Set up an iOS Shortcut
- Add a "Get Contents of URL" action with the URL
https://billbook.me/api/ingestand methodPOST. - Add the headers
Authorization: Bearer bb_...(your token) andContent-Type: application/json. - Set the request body to JSON, for example
{"title":"Coffee","amount":120,"type":"expense"}. - Replace
titleandamountwith "Ask Each Time" variables so the Shortcut asks for the item and amount whenever it runs.
Put the Shortcut on your Home Screen or bind it to Back Tap, and logging an entry is a single gesture.
3. Log entries from cURL or a script
The same endpoint works from a terminal or any automation:
curl -X POST https://billbook.me/api/ingest \
-H "Authorization: Bearer bb_<userId>_<secret>" \
-H "Content-Type: application/json" \
-d '{"title":"Coffee","amount":120,"type":"expense","category":"Food"}'type is one of expense, income, prepaid_expense or pending_income, and defaults to expense. A successful call returns 201 with the new entry's id. The date (created_at) is optional; a back-dated entry must fall within the last 14 days.
4. Look up the last 14 days
Call the same URL with GET to read back entries dated within the last 14 days, newest first — handy for an AI bot answering "how much did I spend this week" or a script doing a daily check:
curl "https://billbook.me/api/ingest?limit=20" \ -H "Authorization: Bearer bb_<userId>_<secret>"
A staff token sees only its owner's entries; an admin or manager token sees the whole organization — the same permissions as the web app. Each entry carries a mine field saying whether you logged it.
What the token can and cannot do
- Last 14 days only: it can add and read entries dated within the last 14 days, plus the category and tag lists; older entries are out of reach.
- No edits or deletes: it cannot change or delete an entry once it is logged.
- It only reaches your own organization — it cannot impersonate anyone or read or write across organizations.
- Revoke or rotate it from Settings at any time; revocation takes effect immediately.
Think before handing an admin token to an outside service such as an AI bot: it will be able to read your whole organization's recent entries.
All fields and error codes are in the remote bookkeeping API docs.