Chapter 15.8

API Keys

How to let another program read your books without giving it anyone's password: one read-only key per program, created by the owner, copied once, revoked the day it is no longer needed.

Level Intermediate Time about 15 minutes to read You need Chapter 1.1; to be the owner of the books Edition November 2026 (revised 5 November 2026)
Learning objectives

When you finish this chapter you will be able to:

  1. Explain what an API key is, what it can read, and why it is safer than sharing a sign-in.
  2. Create a key, name it for the software it serves, and copy it the one time it is shown.
  3. Handle a refused name and a lost key.
  4. Tell the other program the address and header to use, and check that the key works.
  5. Revoke a key and say what happens to the software that used it.
SECTION 1

What a key is

An API (application programming interface) is the door through which one program talks to another. An API key is a long secret string that the other program presents at that door to show it may read these books. Think of it as a key to one room, cut for one tenant.

A BizBooks360 key is read-only. In the page's words, it reads the whole ledger of these books and nothing else. It cannot add, change or delete anything, and it never reaches users, keys, billing or security settings. A program holding a key can fetch the company's details, the chart of accounts and three reports (trial balance, profit and loss, balance sheet); it can never post an entry.2

Why not give the program a user name and password instead? Three reasons:

  1. Separation. A key belongs to a program, not a person. When the bookkeeper leaves, the program keeps working; when the program is retired, nobody's password changes.
  2. One key per program. Each program gets its own key, so you can revoke one without touching the others. The page's own advice is exactly that.
  3. Two-step verification stays on. A sign-in protected by two-step verification (Chapter 15.9) is meant for a person at a screen; a program cannot type the code, and switching the protection off for its sake would weaken the books.
Caution: a key is as good as a password

Anyone who holds the key can read every account and every figure in your books. That is why only the owner can create one. Never e-mail it, paste it in a chat, or keep it in a shared spreadsheet. Paste it straight into the program that needs it, and nowhere else.

SECTION 2

The page

Settings → Users and plan → API keys, the third tab beside Users and permissions and Access review (Chapter 15.7). For the owner the page has three cards: Create a key, Keys in use and Use a key. A set of books can hold up to 25 keys; a 26th is refused with These books already have 25 keys, the most allowed. Revoke a key that is no longer used before creating another.

A member sees no Create a key card, whatever their permissions say. In its place is a note.

API keys in Summit Outfitters Inc., opened by a member: tabs Users and permissions and API keys; a blue note Only the owner of these books can create a key: a key reads the whole ledger; the Keys in use card reads No keys yet. Nothing outside these books reads them. The owner of these books can create a key
Figure 1. The page as a member of Summit Outfitters Inc. sees it. 1 Only the owner of these books can create a key: a key reads the whole ledger. 2 only two tabs: a member has no Access review. 3 the owner can create a key.
API keys for Summit Gear Repair with no key yet: tabs Users and permissions, Access review and API keys; the Create a key card saying a key reads the whole ledger, every account and the reports below, nothing it can change, with a Key name box, the help line The software it is for, such as Tax preparer import or Reporting dashboard, each name used once in these books, the note Up to 25 keys and a Create key button; the Keys in use card reads No keys yet. Create the first key above to let other software read these books
Figure 2. The owner's page in Summit Gear Repair before any key. 1 the key name: the software it is for. Each name is used once in these books. 2 the limit, up to 25 keys. 3 Create key. 4 No keys yet.

The third card, Use a key, is the page you hand to whoever sets up the other program. It says where the program must knock and how.

The Use a key card: a key reads the whole ledger and nothing else and cannot add, change or delete anything; Address http://localhost:871/api/v1; Header X-API-Key: your key on every request, never in the address; Answers JSON, 401 for a missing, wrong or revoked key; Limit 60 requests a minute for each key, past it 429 and a Retry-After header; Last used updated at most once a minute; a table of what a key can read: /company, /accounts, /reports/trial-balance, /reports/profit-loss and /reports/balance-sheet; an example curl command; amounts are whole numbers in cents
Figure 3. Use a key. 1 the address every request goes to.3 2 the key travels in the X-API-Key header, never in the address. 3 a missing, wrong or revoked key gets 401. 4 60 requests a minute for each key; past it, 429 and a Retry-After header. 5 what a key can read. 6 an example request. 7 amounts come in cents.
Read (GET)What it answers
/companyThese books: name, currency, time zone, accounting method, fiscal year end.
/accountsThe chart of accounts, in chart order, without figures.
/reports/trial-balance?as_of=YYYY-MM-DDThe trial balance on a date (optional: from, include_closing, show_zero, start, length).
/reports/profit-loss?from=...&to=...Profit and loss for the period (optional: basis accrual or cash, include_zero).
/reports/balance-sheet?as_of=...The balance sheet on a date (optional: basis, include_zero).

Amounts are whole numbers in the currency's smallest unit: cents for US dollars, so 12345 is $123.45. A program that shows 11590 as a balance means $115.90.

PROCEDURE

Give the tax preparer's program a key

  1. 1

    Name the key after the software

    In Key name type Tax preparer import. Name it for the program, not the person: next year you will want to know at a glance what each key is for.

  2. 2

    Create it and copy it at once

    Press Create key. A card appears at the top: The key "Tax preparer import" is ready, with the key in a box and a Copy key button. The card reminds you that the software sends the key in the X-API-Key header. Press Copy key (or select the key and press Ctrl+C), and paste the key into the tax program's connection settings straight away, together with the address from Use a key.4

Right after Create key: a card The key Tax preparer import is ready, with Paste it into the software that will use it: it sends the key in the X-API-Key header (see Use a key below); a yellow warning This is the only time the key is shown. Copy it before leaving this page; the API key box (blurred in this picture) and a Copy key button. Below, 1 of 25 keys in use, and the Keys in use table with Tax preparer import, created 11/05/2026, last used Never, and a Revoke link
Figure 4. The new key. 1 the key is ready. 2 This is the only time the key is shown. Copy it before leaving this page. 3 the key itself, blurred in this manual.5 4 Copy key. 5 1 of 25 keys in use. 6 last used: Never. 7 Revoke.
  1. 3

    Check that the key works

    Ask whoever set up the program to run its connection test, or try one request yourself from a terminal, with the example on the page. The practice books answered like this (the key itself replaced by YOUR-KEY; use your own address from Use a key in place of localhost:871):3

    curl -H "X-API-Key: YOUR-KEY" "http://localhost:871/api/v1/company"
    
    {"status":"SUCCESS","data":{"guid":"c30787d015da4ff7bd8371b291ede02e",
     "name":"Summit Gear Repair","currency":"USD","time_zone":"America/Los_Angeles",
     "accounting_method":"cash","fiscal_year_end":"2026-12-31"},
     "message":"The books of this key."}

    The same request without the header was refused with 401 and A valid API key is required in the X-API-Key header. A trial balance request for 11/05/2026 returned the accounts with their balances in cents, Accounts Payable among them at a credit of 11590, that is $115.90.

  2. 4

    Know that it will not be shown again

    Open the page again, or press reload, and the key card is gone. The list still shows the key's name and date, and now the day it was last used. Its value is never displayed again, to anyone: the books keep only a scrambled fingerprint of it, not the key itself. If the key is lost before it reaches the program, revoke it and create another; nothing is lost but a minute.

The same page opened again after the key was used: the key card is gone; only Create a key with 1 of 25 keys in use, and the Keys in use table with Tax preparer import, created 11/05/2026, last used 11/05/2026
Figure 5. The page later. 1 only the Create a key card at the top: the value is not shown. 2 last used today, by the test request (the date is updated at most once a minute). 3 1 of 25 keys in use.
  1. 5

    A second key with the same name is refused

    The tax preparer asked for a key for a second computer, and the owner typed the same name again. The page refused: A key with this name already exists in these books. Choose another name. One name, one key, so that the list always says which program holds which key. A second program should get its own name, such as Tax preparer import -- office PC.

Create a key refused: the Key name box holds Tax preparer import again, and the red message reads A key with this name already exists in these books. Choose another name
Figure 6. 1 the same name typed again. 2 the refusal.
Pro tip: keep a key register

Outside the books, keep a short list: key name, the program, who at the vendor set it up, the date created, and when it should be revoked. Review it at each year end and revoke every key nobody can account for.

PROCEDURE

Revoke the key after filing

The return was filed; the tax program no longer needs the books until next season. Leaving the key active would leave a door open for months.

  1. 1

    Press Revoke on the key's row

    The dialog warns that the program loses access as soon as the key is revoked, and that this cannot be undone: a new key can be created instead.

  2. 2

    Confirm

    Press Revoke the key. The banner says The key "Tax preparer import" was revoked. Software that used it can no longer read these books. The list is empty again. A request with the old key now gets 401. Next season, create a new key with the same name: once the old key is revoked its name is free.

The Revoke this key? dialog: Software that uses Tax preparer import loses access to these books as soon as it is revoked. This cannot be undone; a new key can be created instead. Buttons Keep the key and Revoke the key
Figure 7. 1 the warning: access ends at once and cannot be restored. 2 Keep the key. 3 Revoke the key.
After revoking: the green banner The key Tax preparer import was revoked. Software that used it can no longer read these books; Create a key shows Up to 25 keys; Keys in use reads No keys yet
Figure 8. After revoking. 1 the confirmation. 2 back to up to 25 keys. 3 No keys yet.
Caution: revoke at once when a key may be exposed

If a key was pasted somewhere it should not have been, or a laptop holding the program is lost, revoke the key first and ask questions afterwards. Create a new key for the program when it is safe again.

CHECKLIST

Key hygiene

  • [x] One key per program, named after the program.
  • [x] The key was pasted straight into the program and kept nowhere else.
  • [x] The program was given the address from Use a key and sends the key in the X-API-Key header, never in the address.
  • [x] Old keys made before keys worked are revoked and replaced.
  • [x] Every key in the list is in your key register with a reason to exist.
  • [x] Keys for seasonal or retired programs are revoked.
SECTION 3

Check your understanding

1. You closed the page before copying a new key. How do you get its value?

Answer

You cannot; it is shown only once. Revoke it and create another.

2. Two programs need access. One key or two?

Answer

Two, each named for its program, so either can be revoked alone.

3. You revoke a key by mistake. Can you restore it?

Answer

No. Create a new key and paste it into the program.

4. Why give a program a key rather than the bookkeeper's sign-in?

Answer

The key belongs to the program, can be revoked alone, and does not depend on a person's password or two-step code.

5. The tax program's vendor asks for a key that can also enter adjusting entries. Can you give one?

Answer

No. A key is read-only: it reads the ledger and three reports and cannot add, change or delete anything.

6. A member of the books with every permission opens the API keys page. Can they create a key?

Answer

No. Only the owner of the books can; the member sees a note saying so.

Notes

  1. The key in the pictures was created in Summit Gear Repair, used for a few read-only requests, and revoked at the end of the chapter, so the books hold no key. The member's picture comes from Summit Outfitters Inc. ↑
  2. Since November 2026 keys work: a key reads the books through this read-only address, and only the owner of the books can create one. Keys made before then are inactive; the page says to revoke them and create new ones. ↑
  3. The pictures and the sample request were made on a test installation, so the address reads http://localhost:871/api/v1. Your page shows your own BizBooks360 address followed by /api/v1; use that one, since localhost reaches nothing on your computer. ↑
  4. Where the key goes depends on the other program; its own instructions will say where to paste it. Whatever the program, it must send the key in the X-API-Key header to the address shown under Use a key. ↑
  5. BizBooks360 shows the key in full, as it must for you to copy it. The picture in this manual is blurred on purpose; a key in a published picture would have to be revoked. ↑

Volume 15: Settings

  1. 15.1Company, fiscal year and departments
  2. 15.2Menus and words
  3. 15.3Default accounts
  4. 15.4Sales tax and tax groups
  5. 15.5Closing the books
  6. 15.6Copying books
  7. 15.7Users and permissions
  8. 15.8API keys
  9. 15.9Your profile and sign-in security

All volumes and chapters