Create and manage REST API keys
An API key lets your CRM, an internal tool or a script read your workspace’s conversations, leads and contacts, and write to Botello.
- Plans
- All plans
- Roles
- Owner, Admin
- In the admin
- Settings › Workspace › API keys
The Botello REST API lets another system read your workspace’s conversations, leads and contacts, add knowledge and send messages to the assistant. Every call authenticates with a workspace API key. A key has scopes (read, write), is used from a server, and can be revoked at any time.
Syncing leads into a CRM, exporting conversations to a data warehouse, feeding the knowledge base from your CMS, plugging the assistant into your own application.
Before you start
- Key creation is enabled by the Botello team for your workspace. If the API keys tab does not appear, write to support@botello.ch.
- You are an Owner or Admin of the workspace.
- The key will be used server-side. Never put it in a web page or a mobile app.
Create a key
Name the key and choose its scopes
Enter a Key name so you remember who uses it (“CRM”, “Import script”). Tick Read, Write or both. Click Create key.
Copy the key
The key is shown only once: “Copy this key now: it will never be shown again.” Click Copy, store it in your server’s secrets manager, then click I copied the key.
A key looks like bk_live_ followed by 32 letters and digits. Afterwards, the list only shows its first 16 characters so you can recognise it.
Scopes
| Scope | Label | What it allows |
|---|---|---|
read | Read | All GET routes: conversations, messages, leads, contacts, knowledge sources |
write | Write | Add URLs, texts and Q&As to the knowledge base, send messages to the assistant |
The write scope does not include read: tick both if your integration reads and writes. See the list of routes in Endpoints.
Use the key
Send the key in the Authorization header, or in X-Api-Key:
curl https://api.botello.ch/api/v1/leads \
-H "Authorization: Bearer $BOTELLO_API_KEY"
# Same thing with the alternative header
curl https://api.botello.ch/api/v1/leads \
-H "X-Api-Key: $BOTELLO_API_KEY"A missing, malformed, unknown or revoked key gets the same 401 response (API_KEY_INVALID). A key without the required scope gets 403 (API_KEY_SCOPE_MISSING). See Errors and limits.
Monitor, rotate and revoke
- Each key shows “Used on …” (to the minute) or “Never used”.
- Revoke cuts access immediately: “Systems using it lose access immediately.” A revoked key stays in the list with the Revoked badge. Revocation cannot be undone.
- To rotate a key without downtime: create a new key, deploy it in your system, check that it is being used, then revoke the old one.
- A workspace can have at most 10 active keys. Revoked keys do not count.
Revoke a leaked key right away
If a key shows up in a Git repository, a log or an email, revoke it immediately, then create a new one. Botello only keeps a hash of the key: nobody, not even the Botello team, can display it again.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
| The API keys tab does not appear | Feature not enabled for your workspace, or role below Admin | Write to support@botello.ch |
401 API_KEY_INVALID | Key copied incorrectly (space, line break), revoked, or wrong header | Copy the key again; use Authorization: Bearer … |
403 API_KEY_SCOPE_MISSING | The key does not have the required scope | Create a key with Read or Write as needed |
| “This workspace has reached the maximum number of active API keys.” | 10 active keys | Revoke an unused key |
Frequently asked questions
Learn more
Test webhooks and actions with the sandbox
Create a private fake store that receives your webhooks, checks their signature and answers your API actions, with nothing to install.
REST API endpoints
The reference for every route of the Botello REST API, with its parameters, required scope, and an example request and response.
