REST API
Seventeen GET routes over HTTPS, answered as JSON, and for a key allowed to change the books, preview and apply.
Base URL
https://auth.42six.ai/functions/v1/api/v1Every read is a GET and every change a POST (see Changes below), each with Authorization: Bearer ftx_YOUR_KEY. Any other method answers 405 with an Allow header naming the one the route takes. The API is meant for servers and scripts: it sends no CORS headers, so a browser page cannot read it.
Routes
GET /entitiesGET /accounts?entityGET /journal-entries?entity&from&toGET /journal-lines?entity&account&from&toGET /bank-transactions?entity&from&toGET /trial-balance?entity&from&to(from and to required)GET /income-statement?entity&from&to(from and to required)GET /balance-sheet?entity&as_of(as_ofrequired)GET /analytics?entity&preset&as_ofGET /cash-flow?entity&preset&as_ofGET /needs-review?entityGET /rules?entityGET /reconciliations?entityGET /period-locks?entityGET /account-ledger-detail?entity&account&from&to(account, from and to required)GET /reports?entityGET /compare-statements?entity&statement&compare&from&to&compare_from&compare_to&as_of&compare_as_of(statement and compare required)
Each route's parameters are listed on the Tool reference pages.
What a key may read
An API key is given one or more kinds of read. A route outside them answers 403 with "This key cannot read …". entities answers any key, listing only the books the key reaches.
- Ledger (
ledger:read): accounts, journal-entries, journal-lines, rules, reconciliations, period-locks, account-ledger-detail. - Bank transactions (
bank:read): bank-transactions, needs-review. - Reports (
reports:read): trial-balance, income-statement, balance-sheet, analytics, cash-flow, compare-statements.
Changes: preview, then apply
A key the owner allowed to change the books (ledger:write, bank:write) can make the same five changes an AI app can: categorize (bank:write), create-rule (bank:write), move, journal-entry and reverse (ledger:write). Each is two calls. POST /ops/<operation> with a JSON body previews the change: it changes nothing and answers { "plan_id", "kind", "summary", "expires_at" }. POST /plans/<plan_id>/apply, with no body, applies exactly that preview, all or nothing, and answers { "plan_id", "kind", "result", "request_id", "replayed" }.
- A plan expires 10 minutes after its preview. If the books changed since, apply answers 409 and nothing changes: preview again.
- Apply with the key that made the preview: another key, even the one that replaced it, gets 404. Applying a plan that already has a result answers that result with replayed true and never changes the books twice. After a busy answer (409) or a network error, applying again is safe: it replays the result if there is one, and otherwise applies.
- A refusal answers { "error" }, with "
error_description" when there is more to say: 400 a bad body, 403 a change the key may not make, 404 a book or plan the key does not reach, 422 a change the books refuse, 423 a locked period, 429 too many requests. - Every preview and apply that reaches the books is recorded with the key, refusals included. Books your accountant operates for you refuse changes from a key.
- The OpenAPI document lists each body. The 42six command line runs the same changes: 42six categorize … previews, 42six apply --plan-id … applies.
- A key that reaches all books can also hold the families bank:manage (excluding transactions and other bank work), close:write (reconciliations), setup:write (books and imports) and ledger:manage (modules). They reach the app's own operations the same two-step way: POST /ops/<operation> runs the operation and undoes it, answering a
plan_idand what it saw, and apply runs it again only if the books are still as it saw them. Reads that take a JSON body are POST /reads/<read>. The OpenAPI document and 42six --help list them; AI apps connected through MCP do not reach them.
curl -X POST "https://auth.42six.ai/functions/v1/api/v1/ops/categorize" \
-H "Authorization: Bearer ftx_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"entity":"ENTITY_ID","item_ids":["ITEM_ID"],"account":"Office Supplies"}'
curl -X POST "https://auth.42six.ai/functions/v1/api/v1/plans/PLAN_ID/apply" -H "Authorization: Bearer ftx_YOUR_KEY"Conventions
- Dates are YYYY-MM-DD. A range is half-open: from is included, to is not.
- Money is a decimal string such as "1250.00", never a floating-point number.
- Journal entries and lines are posted entries only.
- In journal lines and the trial balance a debit is positive. In bank transactions a positive amount is money out, the bank feed convention. The statements show each line as the app does: revenue, liabilities and equity positive, and accounts at zero left out.
Paging
List routes (entities, accounts, journal-entries, journal-lines, bank-transactions, trial-balance, needs-review, rules, reconciliations and period-locks) answer { "data": [...], "next_cursor": ... } (trial-balance also carries top-level meta). A full page carries next_cursor; send it back as cursor for the next page. A page shorter than limit has next_cursor null and is the last. A last page that happens to be exactly full costs one more call, which returns no rows.
Report documents (income-statement, balance-sheet, compare-statements, analytics and cash-flow) answer one object as { "data": { ... } } with no next_cursor. account-ledger-detail answers { "data": { ..., "lines": [...], "has_more": ... }, "next_cursor": ... } (send next_cursor back as cursor). reports answers { "data": { ..., "books": [...], "books_truncated": ..., "books_next_cursor": ... } } (send books_next_cursor back as cursor when books_truncated is true).
curl "https://auth.42six.ai/functions/v1/api/v1/journal-lines?entity=ENTITY_ID&from=2026-01-01&to=2026-04-01&limit=500" \
-H "Authorization: Bearer ftx_YOUR_KEY"Versions
- Every route is under the /v1 at the end of the base URL. A path outside it answers 404.
- The MCP server speaks protocol version 2025-06-18; see MCP server.
- Changes to the routes, the tools and their answers are listed in the Changelog, newest first.