Skip to main content

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​

  1. In myBooksAi, go to Settings > API Keys, click Generate New API Key, choose a role, and copy the key. It is shown only once.
  2. Send the key in the x-api-key header of every request.
  3. Make your first call, with BASE_URL set 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​

AreaEndpoints
ContactsgetContacts, getContactsNew, getContact, upsertContact, upsertContactwFile, getContactBalance, getContactBalanceNew, deleteContact, deleteContacts
ItemsgetItems, getItem, upsertItem, upsertItemwFile, deleteItem, deleteItems
Chart of accountsgetAccounts, getAccount, upsertAccount, updateSystemAcctCode, deleteAccount, deleteAccounts
TaxesgetTaxes, getTax, upsertTax, deleteTax
TransactionsupsertTxn, getTxns, getTxnsWithFilters, getTxn, cancelTxn, deleteTxn, bulkDeleteTxn, getEarliestModifiedDate, getTxnLogs, sendTxn, sendTxnWP
PaymentsupsertPayment, getPayments, getPayment, getPaymentsByTxnId, getPaymentsByReturnId, getReturnPayment, getPaymentView, deletePayment, bulkDeletePayment, sendPayment
ReportsgetDashboard, 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​