API keys
Create a key for each system or AI assistant, choose what it can do, and rotate or revoke it when you need to.
An API key lets another system or an AI assistant use OpsBrain for your organization. Each key does only what its scopes allow, has a manager who's responsible for it, and stops the moment you revoke it.
Create a key
Managers create keys. OpsBrain asks for your password before it shows the page.
Open Integrations from the sidebar, then API keys, and choose New API key.
Name it after the system or assistant that will use it, like "ERP production" or "Claude for the ops team". When you revoke a key, the name tells you what stops.
Choose what it can do: Read only, Read and queue runs, Everything, or pick scopes one by one.
Choose when it expires: after 30 days, 90 days, a year, or never.
Copy the key. It starts with prefix, and we only show it once.
The page also shows the API address and the MCP server address, ready to copy.
Lost the key?
We can't show it again, because we only keep a fingerprint of it. Rotate the key to get a new secret.
Scopes
Scopes decide what a key can see and change. Give each key only what its job needs.
Scope
What it allows
In Read only
Yes
No
See workflows, their versions and live steps.
See runs, with answers, skips, notes and flags.
See flags.
See teams and their queues.
See health scores and bottlenecks.
See suggestions.
See members, including email addresses.
Open photos and files attached to runs, through links that last an hour.
Queue runs for a team.
Resolve and reopen flags.
Start draft workflows from text.
Read only leaves out members and evidence because they show people's email addresses and photos from the floor. Everything includes them, plus all three writes.
A request that needs a scope the key doesn't have gets status with the code scope_missing and the scope's name. See
error codes
The key's owner
Every key has an owner: the manager who created it, or the one it was handed over to. The key acts for the organization, and things it does in OpsBrain, like resolving a flag, are recorded under the owner's name.
If the owner leaves the organization or stops being a manager, the key stops working and calls get code. Another manager can open the key, choose Hand over, and take it over to turn it back on. Hand a key over before its owner leaves and nothing stops.
Rotate, change or revoke a key
Rotate gives the key a new secret. The old one keeps working for the time you choose (no time, 1 hour, 24 hours or 7 days) so you can update the system without a gap. After that, the old secret gets code.
Edit changes the name and scopes. The secret stays the same, and changes apply from the key's next request.
Revoke stops the key on its next request, for good. Calls get code. You can't undo it.
An expired key gets code. We email its owner 14 days before it expires. Rotate it to get a new secret.
Usage
Each key on the page shows when it was last used, how many requests it made in the last 7 and 30 days, and how many failed. A key that's never used is a good one to revoke.
Every response carries an header. If something looks wrong, send us that id and we can find the exact request.
Keep keys safe
Keep keys on servers, in environment variables or a secrets manager. Never put one in a web page, a mobile app or a Git repository.
Use one key per system. Revoking one then stops only that system.
Give each key the fewest scopes it needs and an expiry date. Rotate keys when someone who had access leaves.
For an AI assistant, start with Read only. Add write scopes only once you trust how it uses them.
If a key leaks, revoke it right away and create a new one. Rotating with no time does the same while keeping the name and scopes.
Connecting an assistant like Claude? See
the MCP server article