OAuth Scopes for Accounting APIs: Beyond Read and Write

Drafting an invoice, sending it, and recording its payment need three different permissions. How to design finance-grade scopes, with Paprel's 111 per-route permissions as the worked example.

Paprel Engineering Team
7 min read
An access gateway admits two accounting connections while a third stops at a closed permission gate

Read vs write is the wrong split for finance. An app that drafts invoices, one that sends them, and one that records payments need three different permissions. Here's how to design them, using Paprel's model as the worked example.

OAuth answers who authorized an app and for which company. It does not answer what the app may do once it has a token. In an accounting system, that second question carries the risk: a token that can create a draft invoice is a convenience; a token that can record a payment or post a journal changes the books.

Why OAuth Alone Is Not Enough

A consent flow tells you:

  • who is authorizing the app
  • which tenant or company is involved
  • that the app gets a token instead of a shared secret

It does not tell the person approving it:

  • which records the app can read
  • whether it can create or change documents
  • whether it can move money or post to the ledger
  • whether its writes stay as drafts for review

For finance systems, those details matter more than the protocol label. The permission model is what the consent screen is actually asking someone to approve.

Paprel's consent form. Consent is only meaningful when the permissions behind it are specific enough to reason about.

Why Read And Write Are Not Enough

Most APIs start with read and write. In accounting, "write" hides at least three different levels of consequence:

ActionWhat it changesReversible?
Create a draft invoice or expenseA document nobody has acted on yetYes, edit or delete it
Send an invoice to a customerWhat a third party has seenNo, the email is out
Record a payment, post a journal, reconcile a bank lineThe general ledger and your reported balancesOnly with a reversing entry

An integration that prepares invoices should not, by default, be able to email them or mark them paid. If your scope model can't express that difference, every integration ends up over-privileged.

A Practical Scope Framework

A useful starting point is four tiers, ordered by how much harm a mistaken or compromised token can do:

  • Context: read reports, balances, clients and vendors. Needed by reporting tools and AI assistants.
  • Workflow: create or update operational documents, such as invoices and expenses, before they affect the ledger.
  • Finance-sensitive: actions that change accounting state directly: recording payments, posting journals, reconciling bank transactions.
  • Admin: roles, webhooks and other configuration that changes who can do what.

The tier names are a design pattern, not something you configure. The next section shows how the tiers map onto the permissions Paprel actually enforces.

How Paprel Splits It

Paprel does not ship coarse scopes. Every route in the OpenAPI spec declares the granular resource:action permissions that can call it. The public spec lists 111 distinct permissions, from accounting:account-list to webhook:manage. Here is the webhook creation route (POST /v1/webhooks/endpoints), verbatim from the spec:

Text
Required permissions (any): webhook:manage, role:admin.

Each of the four tiers maps to real permission names:

TierExample permissionsExample route
Contextreport:trial-balance, client:listGET /v1/reports/trial-balance, GET /v1/clients
Workflowinvoice:add, expense:addPOST /v1/invoices, POST /v1/expenses
Finance-sensitiveinvoice:payment, accounting:journal-add, accounting:banking-transaction-reconcilePOST /v1/invoices/{id}/payment, POST /v1/accounting/journals, POST /v1/accounting/reconciliations
Adminrole:admin, webhook:manage, staff-role:editPOST /v1/webhooks/endpoints, PUT /v1/acl/role/{id}

The three invoice actions from the opening are three separate grants: invoice:add creates the invoice, invoice:send gates POST /v1/invoices/{id}/mail/send, and invoice:payment gates recording a payment. An app that only drafts invoices never needs the other two.

Two details are worth knowing when you design grants:

  • "Any" means any one of the listed permissions. Write permissions often satisfy the matching read route. GET /v1/accounting/journals accepts accounting:journal-add, accounting:journal-edit or accounting:journal-list, so granting a write grants reading that resource too. Plan for that rather than assuming reads are separate.
  • role:admin satisfies every route. It belongs to people administering the company, never to a connected app.

Tokens are tenant-scoped. A token minted for one company can only reach the routes its grants allow inside that company. The authentication guide covers the exchange, and Roles, permissions and audit controls covers how roles compose.

A credential's detail view. Machine-to-machine credentials need the same least-privilege grants as consented apps.

Scopes Matter Beyond OAuth Too

A server-owned API credential is still a token with permissions. In Paprel, API credentials and App Connect clients exchange client_id and client_secret through the same client-credentials grant at POST /v1/app-connect/oauth/token. A credential holding role:admin because "it's our own backend" is the most common way least-privilege fails. Give each credential the tier it needs, one credential per application and environment.

Draft-Only Actions Are A Strong Middle Ground

Many useful integrations, especially AI agents, need to prepare work rather than finish it. A draft-first pattern lets them help while a person keeps the accounting consequence.

Paprel's hosted MCP server works this way. Through MCP, invoices, expenses and journal entries that an agent creates arrive as drafts, and your team reviews and posts each one. The token you issue decides which tools the agent sees.

There is a caveat. Three MCP write tools have no draft step and take effect immediately: client_create, item_create and banking_transaction_categorize (which categorizes or matches a bank transaction). Leave those scopes off unless you want the agent making those changes itself. The custom agent guide walks through issuing a least-privilege connection and keeping posting, sending and matching outside autonomous execution.

Why Tenant Boundaries Matter

Once a platform hosts many companies, every permission question is also a tenant question:

  • which company granted this access
  • whether the token can act outside that company (it shouldn't)
  • whether one installation can be revoked without touching another
  • whether two installations of the same app can hold different grants

If you can't answer these per installation, a clean consent flow still hides risk. See Multi-Tenant Accounting Systems for the isolation side.

Scope Design Affects Auditability Too

Permissions limit what can happen, and the audit trail records what did. When a finance team investigates a change, they need both: what the app was allowed to do, and what it actually did.

In Paprel, the activity log can be filtered by connected app: GET /v1/activity accepts app_connect_id, entity_id, source_type and date filters, so you can list every change one integration made.

Agent activity in Paprel: what a connected client did, attributed to that connection.

Common Scope Design Mistakes

  • One broad scope for very different financial capabilities.
  • Treating report reads like ledger writes, or the reverse.
  • Granting posting or payment rights early "to save a round of review later".
  • Shipping an admin-level credential to an integration because it was faster to set up.
  • Naming scopes after internal services instead of what the action does to the books.

Each of these shows up later as a security review your customer fails you on, or a support ticket about a payment nobody meant to record.

See the auth flow and per-route grants →

Or review roles, permissions and audit controls, or try scoped credentials in the sandbox.

Posted by: Paprel Engineering Team · Engineering
Posted on: (Updated: October 29, 2026)
Evaluate Paprel

Build in sandbox, launch with a production trial

Use sandbox for developer testing with no billing. When you are ready for real workflows, start production on a monthly plan with a 14-day free trial.

API-First Delivery
Audit-Ready Controls
Sandbox And Guided Rollout