Skip to content
BotBaseDocs
PricingDashboardStart free
  • Build AI assistants that know your business
  • Quick start
  • Core concepts
  • Create an account
  • Documents
  • Websites
  • Social media posts
  • How answers are grounded
  • Languages
  • Assistant types and plans
  • Create an assistant
  • Personality and instructions
  • Testing your assistant
  • Conversations
  • Leads, forms and human support
  • Booking agent
  • Email replies
  • AI models
  • Website widget
  • Widget appearance and design
  • Chat link and QR code
  • Connect your business platform
  • CRM lead sync
  • Management Agents overview
  • Integration guide
  • Roles and permissions
  • Security model
  • Server and browser API reference
  • Examples by industry
  • Audit log and troubleshooting
  • Developer API overview
  • API keys
  • Chat API reference
  • Errors and limits
  • Plans and the free trial
  • Billing and payments
  • Emails and notifications
  • Security and privacy
  • Troubleshooting
  • Frequently asked questions
Docs/Developer API/API keys

API keys

Create, restrict, revoke, rotate and safely store the API keys that authenticate Developer API calls.

Developer API·4 min read·Updated 2 Dec 2026

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

  1. 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.

  2. 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.
  3. Save the key

    The Save your API key dialog shows the full key, for example:

    text
    sk-botbase-3f9a0c...e71b

    This 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:

ColumnMeaning
StatusActive, Revoked, or Expired
AccessAll agents, the names of the allowed assistants, or No agents
RequestsHow many calls the key has made
Last usedWhen it was last used, or Never
ExpiresIts 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 403 with "This API key is not authorised to access agent ...".
  • GET /api/v1/agents lists 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:

  1. Create a new key with the same access.
  2. Deploy the new key to your server and confirm calls succeed.
  3. 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

PlanActive keys
Free0 (you cannot create keys)
Standard3
Pro and 14-day trialUnlimited

If you downgrade, existing keys keep working. You can create new keys again only when you are below your plan's limit.

PreviousDeveloper API overviewNext Chat API reference

On this page

  • Create a key
  • The key list
  • Restrict a key to certain assistants
  • Edit, revoke, reactivate, delete
  • Rotate a key
  • Store keys safely
  • Plan limits