Skip to content

Keys for your code, OAuth for assistants

An API key is for a server you run. An OAuth grant is for an app a person connects, and it can never hold more than that person may do.

Authentication

The rules, in order

01

API keys

An owner or admin creates a key in the console, after a recent sign-in. It is shown once: bmk_live_… or bmk_test_…. We store a keyed hash of it, never the key, so we cannot show it to you again. Lose it and you revoke it and make another.

A key carries its scopes, an optional address allow-list, an optional expiry and its own rate limit. A test key exists only for a sandbox workspace and a live key never for one. Every call made with it is audited with the key as the actor.

Every requestSample
Authorization: Bearer bmk_test_…

02

Scopes

A route needs the scope named on its reference entry. A few routes also need a second scope, and their summary says so. A write scope also reads what it writes. A credential that holds a scope outside its type’s ceiling is refused, whatever its document says.

Scopes used by the REST routes
ScopeRoutes
actions:admin37
actions:deliver14
actions:money22
actions:propose3
actions:read3
actions:records31
activity:read2
admin:read12
bills:approve2
bills:read8
bills:write11
business:read19
clients:read4
clients:write6
estimates:read2
estimates:write4
expenses:read1
expenses:write3
invoices:read6
invoices:write21
jobs:read21
jobs:write19
messages:read3
mileage:read1
mileage:write2
organizer:read2
organizer:write4
payments:notes1
payments:read12
payments:record1
payments:refund1
recurring:read2
recurring:write3
reports:read17
sandbox:reset1
templates:read5
templates:write7
time:read3
time:write7
webhooks:manage7
workConfig:write3

03

OAuth 2.1, for apps a person connects

Assistants connect with OAuth against https://api.billingmart.com/mcp. Discovery is standard (RFC 9728 and RFC 8414), clients can register themselves (RFC 7591) or present a client metadata document, and PKCE with S256 is required.

The consent screen lists what the app asked for, grouped and in plain words, with the business picker and a choice between Ask (it may request actions) and Plan (it may only read and show what it would do). Reading contact details is off unless the person ticks it.

Tokens
TokenLifetimeOn reuse
bmat_…access, 1 hour—
bmrt_…refresh, 30 days rolling, rotated on usethe whole grant is revoked

04

A grant is bound to a person

Every call through a grant re-reads the person who consented. Removed from the workspace: refused. Moved to viewer: the same token now reads only. Write scopes need a recent sign-in at consent, and a second factor where the workspace requires one.

The person, or an owner or admin, can narrow a grant or revoke it from Connected apps in the console. The next call sees the change; nobody has to reconnect. No tool can change its own grant.

Next guide

MCP server

Every tool is a REST v1 call under the connecting person’s grant. Anything that sends or moves money becomes a request, and the connection’s mode — Ask, Plan or Auto — decides who approves it.

Continue to MCP server →

Try it in your sandbox

A bmk_test_ key reaches only your sandbox workspace.

We use Google Analytics on our website by default to understand visits. Choose Decline to turn it off; you can change this at any time on the Cookies page. We never send Google your name, email or account. Cookie policy