Features Modules Wingman AI Pricing Bookkeeping Security Contact
Sign in Try the free demo
Developers and AI assistants

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Preview, then post. Send the entry with Dry-Run: true to see its result and journal without saving it, and check it with the person. To save it, send the same post without Dry-Run, with an Idempotency-Key. If you retry that post, reuse the same key, so it is never booked twice.
  7. For how a screen works, read the Setup and User manuals. They are public too.
Before step 1

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/me is the list to trust. It gives each company the key reaches, with companyId, companyName and state (approved, waiting, refused or stopped). Match the person's answer to companyName; this list does not show country or currency. If more than one entry could match, show the matching names and their companyId values 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 its state is 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 companyId matched 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.
Step 1 · the person

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.

  1. Sign in at accuracyaccountingsuite.com, open the company and go to Admin → API connect → API access.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Setting up a key: the app's name, what it may do per area, and the companies it may reach
Choose the app's access
The client ID, the secret and the one-time code, shown once
Copy the details into the app
Step 2 · the app

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):

Token request
POST https://accuracyaccountingsuite.com/api/connect/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&client_id=…&client_secret=…&code=…
Example response
{ "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.

Step 3 · the app

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.

Keys can't do these

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:

TaskWhere 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 offerFinancials → Tax Rates
Business rules (stock, credit limits, cheques…)Admin → General settings
Switch a module on (payroll, fixed assets…)Admin → Modules
Exchange ratesAdmin → Currency Rates
Opening balances, one by one or from ExcelFinancials → Opening Balances · Financials → Opening Balance Workbench
Run payrollPayroll → Payroll Run
Approval rules, and approving or rejectingAdmin → Approval Setup · Admin → Pending Approvals
Users and what they may doAdmin → Users
Plan, extra users, add-onsAdmin → Billing
Delete an entry or a recordNever by key: cancel it through the API, or the person deletes it in the screens where allowed
A new company

Setting up a company: the order

  1. The company is opened with its country and base currency. The currency can't change later, so check it matches the books.
  2. A financial year is opened (person). Nothing posts before this.
  3. Tax registration and tax rates are checked (person).
  4. Modules the business needs are switched on (person).
  5. Chart of accounts, customers, suppliers, items, banks, warehouses are added (the app can do these).
  6. 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.

When a call is refused

Refusals and what to tell the person

CodeStatusWhat it means / what to do
APP_SCOPE_NOT_ALLOWED403First 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_GRANTED403The 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_APPROVAL403Stop 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_OFF403The company's plan doesn't include App connections (Business and above), or it was switched off.
APP_TOKEN_INVALID401The access token expired or is not an app token. Get a new one with the refresh token.
APP_TOKEN_REVOKED401The key was cut off, unused for 180 days, or its person left the company. The person makes a new key.
APP_KEY_ADDRESS_NOT_ALLOWED401 / 400The call came from an internet address the key (or the person's sign-in rules) doesn't allow.
API_RATE_LIMITED429Over the company's call limit. Wait for Retry-After.
CONNECT_TOKEN_RATE_LIMITED429Too many tokens for one key (30 in 10 minutes). Reuse an access token for its hour.
CONNECT_LOCKED429Ten wrong secrets or codes. Wait 10 minutes and check the secret.
invalid_client401Check the client ID and secret in the app.
invalid_grant400The 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.

Limits

Call limits

PlanA minuteA day (UTC)
Business12020,000
Enterprise · Professional300100,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.