API Reference
Authentication
Secure your API requests with workspace API keys.
Creating an API Key
- Go to Dashboard → Settings → API Keys
- Click Generate New Key
- Copy and securely store your key (it won't be shown again)
⚠️ Never expose your API key in client-side code or public repositories.
Using Your API Key
Include your key in the Authorization header as a Bearer token.
Header format
Authorization: Bearer bh_sk_xxxxxxxxxxxxxxxxxxxxxKey Prefixes
BotHive API keys use the following prefixes:
| Prefix | Type | Usage |
|---|---|---|
bh_sk_ | Secret Key | Server-side API calls |
bh_pk_ | Public Key | Client-side (limited access) |
Error Responses
Authentication errors return a 401 status code:
401 Unauthorized
{
"error": "Missing API Key"
}
{
"error": "Invalid API Key"
}Rate Limits
API requests are rate-limited based on your subscription plan:
| Plan | Rate Limit |
|---|---|
| Starter | 100 requests/minute |
| Pro | 500 requests/minute |
| Business | 2000 requests/minute |