Using the APIPermission keys

Using the API

Permission keys

The 48 permission keys that guard every action, what each one allows, the default keys of each role, and how scopes and modes work for API keys and MCP tokens.

Every action in Free Invoice Automation is guarded by exactly one permission key, written module.action, such as documents.create or payments.refund. No action exists without one. The same key is checked whether the action comes from the web app, the REST API, an MCP client, the CLI, a store connector or the AI agent, so no tool is a back door.

This page lists all 48 keys, the default keys of each role, and how keys become scopes on API keys and MCP tokens.

How permissions are checked

For every request, the API:

  1. works out the actor (a member's session, an API key, an MCP token) and the account,
  2. loads the actor's role at that moment (permissions are read per request, never cached in the session),
  3. checks the action's permission key against the role, and for keys and tokens also against their scopes,
  4. checks the business scope: every role except Owner can be limited to some businesses.

If the role lacks the key you get permission_denied (403). If the API key or token lacks the scope you get scope_missing (403). If the business is outside your scope you get business_out_of_scope (403). Each endpoint page names the key it needs.

The full catalogue

Businesses

KeyAllows
businesses.viewSee businesses, their tax rates and numbering sequences, and the pay-me page settings
businesses.manageCreate, update and delete businesses; upload a business logo

Documents

KeyAllows
documents.viewList and read documents, versions and activity, overdue lists, PDFs, send previews, messages, PDF templates, reminder sequences, late-fee policies, recurring schedules, payment schedules and saved views
documents.createCreate invoices, estimates and receipts; convert estimates; manage recurring schedules; invoice unbilled time and expenses
documents.editUpdate documents (a sent one gets a revision), delete drafts, apply client credit, set a promise to pay, manage payment schedules
documents.sendSend documents and reminders; create and revoke share links
documents.voidVoid a document
documents.creditCreate a credit note

Clients

KeyAllows
clients.viewList and read clients, their contacts and client credit
clients.createCreate clients
clients.editUpdate clients; add, change and delete client contacts
clients.deleteDelete clients (soft delete)

Items

KeyAllows
items.viewList, read and export saved items
items.manageCreate, update, archive and import saved items

Payments

KeyAllows
payments.viewSee payments, payment status, payment proofs and a client's saved payment methods
payments.recordRecord and delete manual payments; accept or reject payment proofs
payments.refundRefund a payment
payments.auto_chargeTurn auto-charge on or off for a recurring schedule or instalment (from March 2027)

Rails, senders and templates

KeyAllows
rails.manageList rails; connect, update, verify and delete payment connections (Stripe, bank transfer, Whop, local QR rails); choose a business's payment methods; edit the pay-me page
senders.manageConnect and manage email senders, such as your own SMTP
templates.manageCreate and edit message templates and PDF templates

Reminders and late fees (from January 2027)

KeyAllows
reminders.manageCreate, edit and delete reminder sequences
late_fees.manageCreate, edit and delete late-fee policies
late_fees.waiveWaive a late fee that was applied (audited)

Contracts (from March 2027)

KeyAllows
contracts.viewList and read contracts; download signed contracts
contracts.manageCreate contracts and new versions
contracts.signCountersign a contract for the business

Time and expenses (from April 2027)

KeyAllows
time.viewSee time entries and unbilled time
time.logLog time, start and stop timers, change or delete your own entries
time.manageChange or delete other members' time entries
expenses.viewSee expenses
expenses.manageRecord, change and delete expenses; upload receipts

Reports

KeyAllows
reports.viewRun reports, including aged receivables (from January 2027)
reports.exportExport reports as CSV or PDF

Accounting sync and ledger

KeyAllows
accounting.manageConnect QuickBooks Online or Xero, edit the mapping, backfill, see sync status, retry and disconnect (from May 2027)
ledger.viewSee ledger accounts, journal entries, periods, bank transactions and ledger reports (from June 2027)
ledger.journalPost and reverse journal entries
ledger.manageManage the chart of accounts, apply a template, lock and unlock periods, import bank statements and match transactions

AI

KeyAllows
ai.useRun the AI invoice agent and read its runs; read receipts with AI
ai.manageManage agent automations and your own AI provider keys

Settings, team and integrations

KeyAllows
settings.viewRead settings, the account, members and usage
settings.manageChange settings, the account, tax rates and numbering patterns
team.manageInvite, update, deactivate, reactivate and remove members; create, edit, reset and delete roles
integrations.manageCreate and revoke API keys; manage outgoing webhook endpoints, test them and redeliver; link and manage store connector installs
audit.viewView the audit log (Team)
billing.manageManage the Team subscription, the billing card and credit packs

Account (Owner only)

KeyAllows
account.exportExport all account data
account.deleteDelete the account

account.delete and ownership transfer can never be given to a role other than Owner. Ownership transfer is not a key you can tick: it is checked against the Owner role itself. That is why the catalogue has 48 keys and no transfer key.

Default roles

Every account has five roles: Owner, Admin, Editor, Viewer and Accountant. The matrix shows the keys each one gets by default. Y means the role has the key.

KeyOwnerAdminEditorViewerAccountant
businesses.viewYYYYY
businesses.manageYY
documents.viewYYYYY
documents.createYYY
documents.editYYY
documents.sendYYY
documents.voidYY
documents.creditYY
clients.viewYYYYY
clients.createYYY
clients.editYYY
clients.deleteYY
items.viewYYYYY
items.manageYYY
payments.viewYYYYY
payments.recordYYY
payments.refundYY
payments.auto_chargeYY
rails.manageYY
senders.manageYY
templates.manageYYY
reminders.manageYYY
late_fees.manageYY
late_fees.waiveYYY
contracts.viewYYYYY
contracts.manageYYY
contracts.signYY
time.viewYYYYY
time.logYYY
time.manageYY
expenses.viewYYYYY
expenses.manageYYY
reports.viewYYYYY
reports.exportYYYY
accounting.manageYY
ledger.viewYYY
ledger.journalYY
ledger.manageYY
ai.useYYY
ai.manageYY
settings.viewYYYYY
settings.manageYY
team.manageYY
integrations.manageYY
audit.viewYY
billing.manageY
account.exportY
account.deleteY

In short: Owner has everything. Admin has everything except billing and the two Owner-only account keys. Editor does the daily work: documents, clients, items, payments, templates, reminders, time and expenses, but cannot void, credit, refund or change settings. Viewer can only read. Accountant reads everything finance-related and can also export reports and see the ledger.

Business scope

On top of the role, every member except the Owner has a business scope: all businesses, or a list. A member scoped to one business cannot see or change the others, whatever their role.

Editing roles

The matrix above is the default. What applies at run time is the account's own roles.

  • On Team, every role except Owner can be edited by ticking or unticking keys, or deleted. Presets have Reset to default, which restores the keys in the matrix above. You can create custom roles from scratch or by duplicating a role.
  • Owner is fixed. It always has every key, cannot be edited, reset or deleted (role_locked), and an account always keeps at least one Owner (last_owner).
  • No escalation. Only a member with team.manage can change roles, and nobody can grant a key they do not hold (permission_not_grantable).
  • Roles in use cannot be deleted until their members are moved (role_in_use).
  • Changes apply on the next request, and every change is written to the audit log with the old and new key lists.
  • On Free, the account has the Owner and one view-only Accountant, both fixed. Role editing and custom roles return feature_locked.

See Roles and permissions and Custom roles for the app side, and the Team endpoints for the API.

Scopes on API keys and MCP tokens

API keys and MCP tokens carry scopes, chosen from the same 48 keys, plus a mode.

Scopes

  • When you create a key in Settings > API keys, or approve an MCP client on its consent screen, you choose the scopes. You can only choose keys you hold yourself.
  • At call time, a key is limited to the intersection of its scopes and its creator's current permissions. If the creator's role loses a key, or the creator is deactivated or leaves, the API key and MCP token lose it on the very next request.
  • A key cannot gain scopes after it is created. To widen access, create a new key.
  • Give each key the fewest scopes it needs. A script that only reads overdue invoices needs documents.view, nothing else.

Modes

ModeBehaviour
draft_only (default)Creates drafts. Sends need "confirm": true from the caller, which should come from a person.
auto_sendSends run without confirm. Creating an auto_send key needs a fresh sign-in.

In both modes, destructive actions (void, credit note, refund, auto-charge settings and the others marked D) always need "confirm": true. See Drafts and confirmations.

Typical scope sets

IntegrationScopes
Read-only dashboarddocuments.view, payments.view, clients.view
Billing server that creates and sends invoicesclients.view, clients.create, clients.edit, items.view, documents.view, documents.create, documents.send
Payment reconciliation scriptdocuments.view, payments.view, payments.record
Webhook administrationintegrations.manage