Connect an app or an AI assistant to Accuracy
This page is public, so a developer, or an AI assistant helping someone, can guide a person step by step. The person chooses the company and what the app may do, and makes a key in Accuracy. The app swaps a one-time code for tokens, then calls the API. The person can cut the key off at any time.
For AI assistants: read this first
- Never ask the person for their Accuracy password, and never for passwords, secrets or tokens in a shared or public chat. Guide them through making a key (step 1). The client ID, secret and one-time code go straight into the app that connects. If you are that app, take them only in a private place you control.
- Never sign in to Accuracy for the person, and never ask them to sign in to a browser you control. A signed-in session can do everything the person can, including settings, users and deleting, which is exactly what a key prevents. Tell them which screens to open and what to tick. They make the key themselves and give you only the client ID, secret and one-time code.
- Ask which company, every time. One login can reach several companies. Ask: "Which company should I work in? What country and currency does it use, and what would you like me to do?" Never choose from an earlier session, an open browser tab or the order of a list. Repeat the company name and the job back to the person, and tell them which boxes to tick for that job. If the app only needs to look things up, tell them to leave Post unticked. Before working in the books, match their choice to the key's company list.
- Some things only a person can do in the screens, such as opening a financial year or setting tax rates. Check What only a person can do, and where and send the person to that screen.
- When a call is refused and the message includes
FIX:, explain that instruction in plain words. Otherwise look the code up in Refusals and what to tell the person. Don't work around a refusal. - Preview, then post. Send the entry with
Dry-Run: trueto see its result and journal without saving it, and check it with the person. To save it, send the same post withoutDry-Run, with anIdempotency-Key. If you retry that post, reuse the same key, so it is never booked twice. - For how a screen works, read the Setup and User manuals. They are public too.
One person, several companies
A person's login often reaches more than one company: an owner with two businesses, a group on the Enterprise or Professional plan, or a bookkeeper who keeps several clients' books. Each company has its own books and its own company ID. Its plan, and the person's role in it, can differ from the next company's.
- The person ticks the companies a key may reach when they make it. Only companies whose plan includes App connections can be ticked; the others are shown greyed, with the reason.
- One key can reach several companies. Each company's Admin approves it for that company only; in a group on Enterprise or Professional, the group's admin can approve too. The key can be used in each company as soon as that company approves it. For a company still waiting for approval, calls return
APP_KEY_WAITING_APPROVAL. GET /api/connect/meis the list to trust. It gives each company the key reaches, withcompanyId,companyNameandstate(approved, waiting, refused or stopped). Match the person's answer tocompanyName; this list does not show country or currency. If more than one entry could match, show the matching names and theircompanyIdvalues and ask which is theirs. If the person can't tell, or no entry matches, stop rather than guess. Use the matched company's ID only if itsstateis approved; otherwise tell the person its state, and don't switch to another approved company.- Each call that reads or changes a company's books names that company in its path. Use the
companyIdmatched to the person's choice. If they ask you to work in two companies, match each one separately and make separate calls with the matching IDs. Don't copy entries between companies unless the person asks. - Rights and limits are per company. The person may be an Admin in one company and an ordinary user in the next, so the same call can be allowed in one and refused in the other. Call limits are counted per company too.
Make a key
The company's plan must include App connections (Business and above). A person can give an app only the access they have themselves.
- Sign in at accuracyaccountingsuite.com, open the company and go to Admin → API connect → API access.
- Give the app a name, tick what it may do (Read and/or Post per area, Reports, Attachments, or Read everything) and the companies it may reach (only the ones this job needs). Optionally limit it to the app's internet addresses.
- Choose how long the one-time code lasts (3 to 10 minutes) and press Make the code. Enter your two-step code if you use one.
- Copy the client ID, the secret and the one-time code into the app at once. The secret is shown only once, and the app must swap the code before it expires, even if the key still waits for approval.
- If you are not the company's Admin, the Admin approves the key under Admin → API connect → Connected apps → Waiting. Until then the app's calls to that company are refused with
APP_KEY_WAITING_APPROVAL. An Admin's own key works at once.
To stop an app: API access → Cut off. The Admin can cut off any key under Connected apps. The next call is refused.
Swap the code for tokens
Within the code's few minutes, the app sends it to the token endpoint (OAuth 2.0 style, form-encoded or JSON):
POST https://accuracyaccountingsuite.com/api/connect/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&client_id=…&client_secret=…&code=…
{ "access_token": "…", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "…" }
The access token lasts one hour. For a new one, send grant_type=refresh_token with client_id, client_secret and refresh_token; keep using the same refresh token. The client ID and secret may also go in an HTTP Basic header instead of the body (not both).
If the code has expired or was already used, the answer is invalid_grant: ask the person for a New code on the key's row in API access.
Call the API
Send Authorization: Bearer <access_token> on every call. First call GET /api/connect/me. Find the company the person chose and check what the key may do there and whether that company has approved it. Use that company's ID in place of {companyId}, for example GET /api/companies/{companyId}/customers. If you can't tell which company it is, stop and ask. Never use another company's ID.
The key works as the person who made it, never beyond what they may do themselves, and only in the companies whose Admin approved it. Entries follow the company's approval rules exactly as the person's own, and show "via <app name>" in the company's lists.
A refusal answers with a sentence and a code, for example { "error": "… FIX: …", "errorCode": "APP_SCOPE_NOT_ALLOWED" }. The full list of calls, with what each needs, is the API reference (OpenAPI 3) and its changelog.
Connecting a new company? Before the first post, check Setting up a company: the order. A person must open a financial year in Financials → Financial Years; the app can't.
What only a person can do, and where
A key can never change a company's settings, its users or its approvals, and it never deletes (it cancels instead). When the API refuses one of these with APP_SCOPE_NOT_ALLOWED, tell the person where to do it:
| Task | Where the person does it |
|---|---|
| Open a financial year (nothing posts until one is open) | Financials → Financial Years |
| Tax registration number (TRN, NTN, STRN…) | Admin → General settings → Tax registration |
| Tax rates the invoices offer | Financials → Tax Rates |
| Business rules (stock, credit limits, cheques…) | Admin → General settings |
| Switch a module on (payroll, fixed assets…) | Admin → Modules |
| Exchange rates | Admin → Currency Rates |
| Opening balances, one by one or from Excel | Financials → Opening Balances · Financials → Opening Balance Workbench |
| Run payroll | Payroll → Payroll Run |
| Approval rules, and approving or rejecting | Admin → Approval Setup · Admin → Pending Approvals |
| Users and what they may do | Admin → Users |
| Plan, extra users, add-ons | Admin → Billing |
| Delete an entry or a record | Never by key: cancel it through the API, or the person deletes it in the screens where allowed |
Setting up a company: the order
- The company is opened with its country and base currency. The currency can't change later, so check it matches the books.
- A financial year is opened (person). Nothing posts before this.
- Tax registration and tax rates are checked (person).
- Modules the business needs are switched on (person).
- Chart of accounts, customers, suppliers, items, banks, warehouses are added (the app can do these).
- Opening balances are entered (person), then daily entries: sales, purchases, receipts, payments, journals (the app can do these).
Each step is explained in the Setup manual. An app can check a step with read calls, for example GET /api/companies/{companyId}/fiscal-years and GET /api/companies/{companyId}/tax-rates, before it starts posting.
Refusals and what to tell the person
| Code | Status | What it means / what to do |
|---|---|---|
APP_SCOPE_NOT_ALLOWED | 403 | First check What only a person can do, and where. If the task is listed, send the person to that screen: a new key won't help. Otherwise the person makes a key with the missing box ticked. |
APP_COMPANY_NOT_GRANTED | 403 | The key doesn't reach this company. Check the company ID in /api/connect/me and ask the person which company they meant. If it is missing from the list, they make a key that ticks it. |
APP_KEY_WAITING_APPROVAL | 403 | Stop here. Ask the company's Admin to approve the key under Admin → API connect → Connected apps → Waiting, then retry the call. (A new code is not needed.) |
APP_CONNECTIONS_OFF | 403 | The company's plan doesn't include App connections (Business and above), or it was switched off. |
APP_TOKEN_INVALID | 401 | The access token expired or is not an app token. Get a new one with the refresh token. |
APP_TOKEN_REVOKED | 401 | The key was cut off, unused for 180 days, or its person left the company. The person makes a new key. |
APP_KEY_ADDRESS_NOT_ALLOWED | 401 / 400 | The call came from an internet address the key (or the person's sign-in rules) doesn't allow. |
API_RATE_LIMITED | 429 | Over the company's call limit. Wait for Retry-After. |
CONNECT_TOKEN_RATE_LIMITED | 429 | Too many tokens for one key (30 in 10 minutes). Reuse an access token for its hour. |
CONNECT_LOCKED | 429 | Ten wrong secrets or codes. Wait 10 minutes and check the secret. |
invalid_client | 401 | Check the client ID and secret in the app. |
invalid_grant | 400 | The code or refresh token is no longer valid. In API access, the person chooses New code on this key's row. |
Any other refusal comes from the accounting itself (a closed period, a missing tax rate, a credit limit…). Its error sentence names the problem and says how to fix it.
Call limits
| Plan | A minute | A day (UTC) |
|---|---|---|
| Business | 120 | 20,000 |
| Enterprise · Professional | 300 | 100,000 |
Limits are per company and count only calls that were let through. Read X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset in each response (and X-RateLimit-Day-Limit, X-RateLimit-Day-Remaining for the day). Calls that name no company, such as /api/connect/me, allow 120 a minute per key.
Everything else is in the manuals
Every screen, step by step, readable without signing in.

