Skip to main content

API Keys

API keys authenticate external integrations against the BeanRails public API. Each key belongs to the member who created it, carries a fixed set of scopes, and can be revoked at any time.

note

This page covers creating and managing keys. Endpoints, request fields and responses are described in the BeanRails API documentation.

Accessing API Keys​

Click the gear icon in the top bar, then choose API Keys under Automation & Data.

Like Webhooks, this page is open to every team member — keys are personal and self-service. Whether you can create one depends on your role.

Creating a key​

  1. Click Create.
  2. Fill in the fields below.
  3. Click Create again to generate the key.
FieldDescription
NameA label to recognise the key by, e.g. Zapier integration. Required
ScopesWhat the key is allowed to do — see Scopes. At least one is required
Expires In30, 90 or 365 days. Defaults to 90
warning

The key is displayed once, immediately after creation, and is never shown again — only a hash is stored. Copy it (there is a copy button next to it) before closing the dialog. If you lose it, revoke the key and create a new one.

Keys look like brk_live_ followed by 40 random characters. The list afterwards shows only the first 16 characters as a prefix, so you can tell your keys apart.

Scopes​

ScopeGrants
contacts:readRead contacts
contacts:writeCreate and update contacts
works:readRead works
works:writeCreate and update works
documents:readRead quotations and invoices
documents:writeCreate and update quotations and invoices, and record invoice payments

You can only request scopes your own role already grants. For example, if your role has no create or update permission for contacts, contacts:write is rejected when you try to create the key.

This is also checked live on every API request, not just at creation. If your role is downgraded later, any key of yours immediately loses the matching capability — without the key being touched or revoked. Re-granting the permission restores it.

note

Scopes control what kind of data a key can reach, not which records. If your role restricts you to records you own, keys you create carry the same restriction.

Using a key​

Send the key as a bearer token:

Authorization: Bearer brk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Public API endpoints live under the /api/public/v1/ path. Session cookies and other token types are never accepted there — bearer keys only.

Failures return a structured error:

{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid, revoked, or expired."
}
}
CodeMeaning
missing_api_keyNo Authorization header was sent
invalid_api_keyThe key does not exist, has been revoked, or has expired
account_suspendedThe account that owns the key is suspended
plan_inactiveThe workspace's free trial or subscription has ended. Renew it to use the API again — reads are blocked too
rate_limitedThe key went over its rate limit
too_many_failed_attemptsToo many requests with invalid keys came from the same IP address. Wait and try again

Requests are rate limited per key, defaulting to 60 per minute.

Every call made with a key is recorded, and changes made through the API show the key's name on the record's timeline.

Key status​

StatusMeaning
ActiveUsable
ExpiredPast its expiry date. Create a new key to replace it
RevokedManually revoked and permanently unusable

Revoking a key​

Click the bin icon next to a key and confirm.

warning

Revoking is immediate and cannot be undone. Any integration using the key stops working at once. Revoked keys stay in the list as a record — they are not deleted.

Who can create keys​

Team owners can always create keys. Other members need a role with Create Personal API Key enabled — see Roles & Permissions. Without it, the page shows "Your role does not allow creating an API key."