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.
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
- Click Create.
- Fill in the fields below.
- Click Create again to generate the key.
| Field | Description |
|---|---|
| Name | A label to recognise the key by, e.g. Zapier integration. Required |
| Scopes | What the key is allowed to do — see Scopes. At least one is required |
| Expires In | 30, 90 or 365 days. Defaults to 90 |
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
| Scope | Grants |
|---|---|
contacts:read | Read contacts |
contacts:write | Create and update contacts |
works:read | Read works |
works:write | Create and update works |
documents:read | Read quotations and invoices |
documents:write | Create 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.
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."
}
}
| Code | Meaning |
|---|---|
missing_api_key | No Authorization header was sent |
invalid_api_key | The key does not exist, has been revoked, or has expired |
account_suspended | The account that owns the key is suspended |
plan_inactive | The workspace's free trial or subscription has ended. Renew it to use the API again — reads are blocked too |
rate_limited | The key went over its rate limit |
too_many_failed_attempts | Too 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
| Status | Meaning |
|---|---|
| Active | Usable |
| Expired | Past its expiry date. Create a new key to replace it |
| Revoked | Manually revoked and permanently unusable |
Revoking a key
Click the bin icon next to a key and confirm.
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."