Authentication

How to create an API key in the app and authenticate your requests with it.

Every request to the KontoBee API is authenticated with an API key sent in the X-Partner-Api-Key header. Without a valid key, the API responds with 401 Unauthorized.

Creating an API key

You manage API keys in the KontoBee app under API → API Keys. Any account that carries its own plan can create keys — including a tax firm’s client who pays for itself. Only clients whose plan the tax firm pays have no keys of their own. Every key is bound to an active owner of the account.

When creating a key, you set:

  • Label — a name so you recognise the key later.
  • Scopes — which parts of the API the key may use (see below).
  • Expiry — optionally a lifetime in days. Left empty, the key never expires.

The key is shown once — after that it cannot be retrieved again; KontoBee stores only a hash. Up to 10 active keys are allowed per account. Keys use the format ed_live_ followed by an identifier and a secret, for example:

ed_live_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.k9

Scopes

Scopes limit what a key can do. Grant only what your integration actually needs:

Scope Allows
write:invoices Upload receipts and poll processing status
read:invoices Read processed documents with extracted data and bookkeeping
write:invoices-data Transfer vendor and customer master data, send coding feedback
read:usage Read usage
manage:businesses Create and manage clients — tax firm and partner accounts only

Using a key

Send the key in the X-Partner-Api-Key header with every request:

curl -sS "$BASE/api/partner/v1/usage" \
  -H "X-Partner-Api-Key: ed_live_…"

Alternatively, the API also accepts the key as a bearer token in the Authorization header.

Error responses

A missing or invalid key gets 401 Unauthorized. A valid key without the required scope gets 403 with the code PARTNER_SCOPE_INSUFFICIENT:

{
  "code": "PARTNER_SCOPE_INSUFFICIENT",
  "message": "The API key does not have the required scope for this operation.",
  "requestId": "4f6a1c2e-…"
}

Security

  • Treat keys like passwords: don’t commit them to repositories, don’t embed them in client-side code.
  • Revoke compromised keys immediately under API → API Keys — requests with the old key fail afterwards.
  • For API partner accounts an IP allowlist can be set per key — there it is mandatory for live keys; the API then only accepts requests from those addresses.