ac-co.ai docs

Scopes

The full OAuth / API key scope catalog, generated from the source of truth in the codebase.

Every API key and OAuth access token carries a set of scopes that determine what it can do. :write scopes always imply the matching :read scope — a key with accounting:write can also call accounting:read endpoints. An API key created with no scopes selected is a legacy "full access" key: it can call every non-restricted endpoint your account can reach, so prefer picking specific scopes for anything new. Restricted scopes are the one exception — see below.

This table is generated at build time from @repo/auth/public-api-scopes — the same module that drives the OAuth consent screen and the Settings → Developers key creator — so it can never drift out of sync with what the API actually enforces.

ScopeGrantsApproval
openidVerify who you are so you can sign in.Self-service
entities:readView your legal entities and income sources.Self-service
entities:writeCreate and update your legal entities and income sources.Self-service
accounting:readView invoices, quotes, counterparties, transactions, and reports.Self-service
accounting:writeCreate and update invoices, quotes, counterparties, and transactions.Self-service
banking:readView connected bank accounts and their transactions.Self-service
vault:readView documents stored in your document vault.Self-service
vault:writeUpload and update documents in your document vault.Self-service
billing:readView billing, subscription, and credits information.Self-service
periods:readView accounting period status and close state.Self-service
webhooks:readView your configured outbound webhook subscriptions and delivery history.Self-service
webhooks:writeCreate, update, and delete outbound webhook subscriptions.Self-service
hmrc:readView HMRC filing status and submissions. Restricted — requires manual approval; HMRC compliance obligations apply.Restricted — manual approval
hmrc:writeSubmit filings to HMRC on your behalf. Restricted — requires manual approval; HMRC compliance obligations apply.Restricted — manual approval
payroll:readView employees (National Insurance numbers masked, no bank details), pay runs, P32 liabilities and the status of payroll filings (FPS, EPS). Restricted — requires manual approval.Restricted — manual approval
payroll:preparePrepare a payroll filing (FPS or EPS) for a person to approve in the app. Cannot approve or send it. Also allows the payroll reads. Restricted — requires manual approval.Restricted — manual approval
cis:readView CIS300 returns, subcontractor verification status and the status of CIS filings. Restricted — requires manual approval.Restricted — manual approval
cis:preparePrepare a CIS300 return or a CIS verification for a person to approve in the app. Cannot approve or send it. Also allows the CIS reads. Restricted — requires manual approval.Restricted — manual approval
p11d:readView the status of P11D / P11D(b) (EXB) filings. Restricted — requires manual approval.Restricted — manual approval
p11d:preparePrepare the P11D and P11D(b) for a tax year for a person to approve in the app. Cannot approve or send it. Also allows the P11D reads. Restricted — requires manual approval.Restricted — manual approval

Restricted scopes

Scopes marked Restricted (hmrc:read, hmrc:write, payroll:read, payroll:prepare, cis:read, cis:prepare, p11d:read, p11d:prepare) require manual approval by ac-co.ai before they can be granted to an API key or OAuth client — including a legacy "full access" key created with no scopes selected. hmrc:read covers the two Self Assessment reads. The payroll scopes are described in Payroll, CIS and P11D; a :prepare scope also allows the reads of its own group and nothing else, and never approves or sends a filing. See also HMRC data.

Checking what a request is missing

If a request is rejected for missing scope, the response tells you exactly which one was required — see Errors for the insufficient_scope response shape.

On this page