API keys
Create, restrict, revoke, rotate and safely store the API keys that authenticate Developer API calls.
API keys authenticate calls to the Developer API. They are long-lived, belong to one workspace, and are managed in that workspace's Developer tab.
#Create a key
Open the Developer tab
Open your workspace and choose Developer. If your plan does not include the Developer API, you see "Developer API is included in Standard and Pro" instead. See Plan requirement.
Click Create API key
Fill in:
- Key name (required, up to 100 characters): a label for your own reference, for example "Production website" or "WhatsApp bot".
- Expiry (optional): leave blank for a key that does not expire. The date you pick is the last usable day.
- Restrict this key to specific agents (optional): tick the assistants this key may call. Leave it off to allow every assistant in the workspace.
Save the key
The Save your API key dialog shows the full key, for example:
textsk-botbase-3f9a0c...e71bThis is the only time the full key is shown. Copy it straight into your server's secret storage. After you close the dialog, the dashboard shows only the first characters (the prefix) so you can recognise it.
Keys have the form sk-botbase- followed by 40 hexadecimal characters. BotBaseX stores only a SHA-256 hash of the key, never the key itself, so nobody, including BotBaseX staff, can show it to you again. If you lose it, create a new one.
#The key list
For each key the dashboard shows:
| Column | Meaning |
|---|---|
| Status | Active, Revoked, or Expired |
| Access | All agents, the names of the allowed assistants, or No agents |
| Requests | How many calls the key has made |
| Last used | When it was last used, or Never |
| Expires | Its expiry date, or Never |
The cards above the list show active keys, total API requests across all keys in the workspace, and how many assistants are available.
#Restrict a key to certain assistants
A key can be limited to a list of assistants:
- All agents (no restriction): the key may call any active assistant in the workspace, including ones you add later.
- Selected agents: the key may call only those. Calls to any other assistant return
403with "This API key is not authorised to access agent ...". GET /api/v1/agentslists only the assistants a key may call.
A key can never call an assistant in a different workspace, whatever its settings. That returns 403.
Use separate keys for separate integrations. For example, one key for your WhatsApp bot that can only call the "Customer Support" assistant, and another for your internal tool.
#Edit, revoke, reactivate, delete
From a key's actions menu:
- Edit name & access: rename the key or change which assistants it may call. Takes effect immediately.
- Revoke key: API calls with this key stop immediately (
401 Invalid or revoked API key.). The key stays in the list as Revoked. - Reactivate key: turns a revoked key back on. An expired key stops working on its expiry date whether it is active or not; create a new key instead.
- Delete key: permanently removes the key.
Revoked keys do not count toward your plan's key limit.
#Rotate a key
There is no single "rotate" button. To replace a key without downtime:
- Create a new key with the same access.
- Deploy the new key to your server and confirm calls succeed.
- Revoke the old key. Watch its Last used time; once it stops changing, nothing uses it any more, and you can Delete it.
Rotate immediately if a key may have been exposed, for example committed to a public repository, pasted in a chat or included in a mobile app.
#Store keys safely
- Keep keys on the server only. Never put them in browser JavaScript, a website widget, or a mobile app you distribute. Anyone who extracts the key can use your assistants and your monthly message allowance.
- Load the key from an environment variable or your hosting provider's secret manager, not from source code.
- Do not log the full key. If you need to identify it in logs, use the prefix shown in the dashboard.
- Give each integration its own key, restricted to the assistants it needs, so you can revoke one without breaking the others.
- Set an expiry date for keys used in short projects or by contractors.
#Plan limits
| Plan | Active keys |
|---|---|
| Free | 0 (you cannot create keys) |
| Standard | 3 |
| Pro and 14-day trial | Unlimited |
If you downgrade, existing keys keep working. You can create new keys again only when you are below your plan's limit.