Skip to main content
POST
Connects a channel to the instance. What happens next depends on the channel’s connection type:
  • Token-based channels (like Discord or Telegram): provide the required credentials in config and the channel connects immediately.
  • Interactive channels (like WhatsApp): the connection starts a pairing flow. You’ll get back QR data to scan, and the status will be "awaiting_scan" until the user completes the process.
Behind the scenes, this writes the configuration to openclaw.json and restarts the gateway.

Authentication

Requires an org-level API key or a scoped token with the channels permission.

Path Parameters

string
required
The ID of the instance.
string
required
The channel identifier (e.g. discord, whatsapp).

Body Parameters

object
required
A key-value map of configuration fields for this channel. Use the channel info endpoint to discover which fields are required. For interactive channels, you can optionally provide extra config.

Response

string
The channel identifier.
string
Either "connected" (channel is live) or "awaiting_scan" (interactive channels waiting for user action).
string
Raw QR code data for interactive channels. Only present when status is "awaiting_scan".
string
Base64-encoded PNG image of the QR code. Only present when status is "awaiting_scan".
string
An optional human-readable status message.