Skip to main content
Use the Channels API to programmatically manage which messaging platforms connect to each agent. Each channel links an agent to an external messaging service — such as Feishu, WeCom, DingTalk, or Telegram — using platform-specific credentials stored in the channel’s config object. All endpoints require owner-level access to the parent agent.

Base path

Endpoints

Create a channel

Provide a kind, a name, and a platform-specific config object.
A successful request returns 201 Created with the new channel row, including its assigned id (used as {cid} in subsequent calls). Put display options on config. These match Message display in the channel drawer:

Supported kinds

For kind: "qq", config typically includes app_id, secret (or client_secret), optional c2c_streaming (default true when you save from the web UI), and optional group_context (visibility, activation, history, history_limit).
Octop validates the kind value against its registered channel builders. If you pass an unrecognised platform name, the server returns 400 CHANNEL_KIND_UNSUPPORTED.

QQ QR bind

Generate a QR session, then poll until the mobile QQ scan succeeds:
On success the poll response includes app_id and secret you can persist with POST / PATCH on the channel.

Test a channel

After creating a channel, verify its credentials are valid and the platform is reachable by calling the test endpoint. Octop instantiates the channel handler, starts it, and stops it, returning a simple ok flag.

Update a channel

Send a PATCH with only the fields you want to change — name, config, or both. The response contains the updated channel row.

Delete a channel

Deleting a channel disconnects it from the agent immediately and returns 204 No Content.

Probe before creating

Use the probe endpoint to validate a candidate config before committing to a full channel creation. Send POST /agents/{aid}/channels/probe with the same kind and config you plan to use — it returns {"ok": true} or {"ok": false, "reason": "...", "detail": "..."} without persisting anything.