API Reference
The myBooksAi Public API lets your own software — an ERP, e-commerce store, CRM, BI dashboard or automation tool — read and write your myBooksAi business data over HTTPS, without a user logging in through the browser.
This is Phase 1 of the API. It covers the most commonly integrated areas: contacts, items, chart of accounts, taxes, transactions (invoices, bills, expenses and the other document types), payments, and core financial reports. Areas not listed on this page (Banking, Inventory adjustments screens, Documents, Manufacturing, Projects, Budgets and others) are not reachable with an API key yet and will be added in a later phase.
Before you start, generate a key under Settings > API Keys. See API Keys.
Quick start
- In myBooksAi, go to Settings > API Keys, click Generate New API Key, choose a role, and copy the key. It is shown only once.
- Send the key in the
x-api-keyheader of every request. - Make your first call, with
BASE_URLset to the API's base URL:
curl -s "$BASE_URL/masterdata/getContacts" \
-H "x-api-key: YOUR_API_KEY"
A successful call returns 200 with a JSON array of your contacts (or 204 No Content if you have none).
Base URL
The base URL for the API will be published here once it is available. All paths in this document are relative to it, for example /txndata/getTxn/{txnId}. There is no /v1 prefix. Only HTTPS is supported.
Your business is identified by the API key itself — you never send a business ID.
Machine-readable specification
The API is also described by an OpenAPI 3 document (JSON), served at /openapi.json relative to the base URL.
Use it to generate client libraries or import the API into Postman, Insomnia or similar tools. This page is the human-readable guide; if the two ever differ, the OpenAPI document reflects what is currently deployed. There is no interactive Swagger UI.
Endpoints at a glance
| Area | Endpoints |
|---|---|
| Contacts | getContacts, getContactsNew, getContact, upsertContact, upsertContactwFile, getContactBalance, getContactBalanceNew, deleteContact, deleteContacts |
| Items | getItems, getItem, upsertItem, upsertItemwFile, deleteItem, deleteItems |
| Chart of accounts | getAccounts, getAccount, upsertAccount, updateSystemAcctCode, deleteAccount, deleteAccounts |
| Taxes | getTaxes, getTax, upsertTax, deleteTax |
| Transactions | upsertTxn, getTxns, getTxnsWithFilters, getTxn, cancelTxn, deleteTxn, bulkDeleteTxn, getEarliestModifiedDate, getTxnLogs, sendTxn, sendTxnWP |
| Payments | upsertPayment, getPayments, getPayment, getPaymentsByTxnId, getPaymentsByReturnId, getReturnPayment, getPaymentView, deletePayment, bulkDeletePayment, sendPayment |
| Reports | getDashboard, ledger-entries, ledger-entries-with-balance, ledger-totals, contact-txns, contact-statement, reportPdf, reportExcel |
Any endpoint not listed here is not available to API keys and returns 401.
In this guide
- Authentication — sending your API key.
- Access control — roles, plans and branches.
- Conventions — formats, IDs, upserts, incremental sync, filters and file uploads.
- Rate limits
- Errors
- Good practice and support