API Keys

API keys are used to authenticate requests to the Boty API.

Generate an API Key

1

Go to Settings

Navigate to SettingsAPI Keys in your dashboard.
2

Create Key

Click Generate New Key and give it a name.
3

Copy Key

Copy the key immediately - it won’t be shown again.

Using Your API Key

Include the API key in the Authorization header:
curl -X GET https://api.boty.chat/api/agents \
  -H "Authorization: Bearer YOUR_API_KEY"

JavaScript Example

const response = await fetch('https://api.boty.chat/api/agents', {
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  }
});

Python Example

import requests

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Content-Type': 'application/json'
}

response = requests.get('https://api.boty.chat/api/agents', headers=headers)

Key Permissions

API keys inherit the permissions of the user who created them.
ScopeAccess
agents:readView agents
agents:writeCreate/update agents
conversations:readView conversations
workspace:adminFull workspace access

Security Best Practices

Never expose API keys in client-side code, public repositories, or logs.
  • Store keys in environment variables
  • Rotate keys periodically
  • Use separate keys for development and production
  • Revoke unused keys