Getting Started

Authentication

Use the channel key for query, the platform key for export, and no key for health.

Channel API key

In the dashboard, select an agent and open Deploy → API → Setup / Manage. Create or copy the channel key. Use it for POST /v2/chat; the channel must be active and the organization's plan must include API access.

Authorization: Bearer YOUR_CHANNEL_API_KEY

The channel determines the agent, instructions and conversation scope. A platform key cannot replace it for query.

Platform API key

Open Settings → Developer → API keys for the active organization and create or copy a general key (GENERAL). This is the platform API key. See Workspace API keys.

Authorization: Bearer YOUR_PLATFORM_API_KEY

Use this key for GET /v2/agents/{agent_id}/conversations/export and supply agent_id in the URL path. It can export only that organization's agents and conversations. Channel keys, widget tokens, dashboard session tokens and integration-specific keys do not authenticate export. The organization's plan must include API access; historical or inactive customer channels can still be exported if they have not been deleted.

Public health check

GET /v2/health requires no Authorization header.

Handling keys

Keep both keys in server-side environment variables. Rotate a key by creating its replacement, updating your integration, then deleting the old key. Use HTTPS and avoid putting keys in query strings, browser bundles, logs or source control.

A missing or invalid key returns 401 INVALID_API_KEY; unavailable API access returns 403 API_ACCESS_NOT_AVAILABLE. An inactive query channel returns 403 API_CHANNEL_INACTIVE.

MuChat documentation

On this page