Skip to main content

Getting Started

AUTHENTICATION

All API requests require authentication via Bearer token or API key.

Bearer Token

After login or register, you receive an access_token. Pass it in every request:

bash
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Tokens expire after 24 hours. Use the refresh endpoint to rotate.

API Key

For server-to-server integrations, create an API key from your Profile page. Keys are prefixed with cm_:

bash
Authorization: Bearer cm_your_api_key_here

API keys never expire but can be revoked at any time.

Anthropic SDK (x-api-key header)

When using the Anthropic-compatible endpoint (/v1/messages), you can also authenticate with the x-api-key header:

bash
x-api-key: cm_your_api_key_here

Both header styles work on the Anthropic endpoint — use whichever your SDK sends by default.

Scopes

When creating an API key you can restrict its access:

ScopeDescription
bots:readList and view bots
bots:writeCreate, update, delete bots
conversations:readView conversations and messages
conversations:writeUpdate conversation status
knowledge:readView knowledge base entries
knowledge:writeAdd and remove knowledge entries
webhooks:writeTrigger outbound calls

Leave scopes empty for full access.

> Note: Scopes are stored on API keys but enforcement on the unified AI services endpoints (/v1/chat/completions, /v1/audio/*) is coming soon. Currently all valid API keys have full access to these endpoints.

Was this page helpful?