Channels
Channels bind a platform, credentials, and target chat to a stable channel_id.
Register channels with POST /v1/channels/new (/new creates a durable
resource). Outbound chat on MESSAGE channels uses POST /v1/messages/send, not
/new.
Create
POST /v1/channels/new
{
"channel_id": "ops-slack",
"platform": "slack",
"target_chat_id": "C01234567",
"credentials": {
"bot_token": "xoxb-...",
"signing_secret": "..."
},
"callback_url": "https://agent.example/on_message",
"channel_type": "MESSAGE"
}| Field | Type | Notes |
|---|---|---|
channel_id | string | Required, stable slug |
platform | enum | telegram | slack | … — immutable after creation |
target_chat_id | string | Platform-specific chat / channel / space / PSID |
credentials | object | Platform-specific strings |
callback_url | string | Required for MESSAGE |
channel_type | enum | MESSAGE (default) or PROMPT — immutable after creation |
Returns 409 if channel_id already exists. To reuse an id after
DELETE /v1/channels/{id}, call PATCH /v1/channels/{id} (not
POST).
Platform webhooks vs callback_url
Two different URLs are involved for MESSAGE channels on webhook-based platforms:
| URL | Direction | Purpose |
|---|---|---|
{PUBLIC_WEBHOOK_URL}/webhooks/{organization_id}/{platform}/{channel_id} | Platform → Greenlight | Chat platform delivers inbound events to Greenlight |
callback_url on the channel | Greenlight → your agent/automation | Greenlight forwards inbound chat as message.created |
PROMPT channels usually only need the Agent API (POST /v1/prompts/new). Telegram
can use long polling locally without a public platform webhook.
Update
PATCH /v1/channels/{id}
Update mutable fields: target_chat_id, credentials, callback_url. Also
reactivates a channel after DELETE. platform and channel_type cannot be
changed — create a new channel with a new channel_id instead.
Routing rules
- PROMPT — many agents or workflows can
POST /v1/prompts/newto the samechannel_id. Answers go to each prompt’scallback_url, not a shared channel callback. - MESSAGE — inbound chat goes to the single
callback_urlset on the channel. There is no fan-out to multiple webhooks. - Prefer one active
channel_idper platform + target chat + credentials. If two active rows share that binding, inbound resolution is nondeterministic.
See Features & benefits for diagrams and when to choose each mode.
List and delete
GET /v1/channels?platform=slack&channel_type=MESSAGE&limit=50
DELETE /v1/channels/{id}Both require X-API-Key when auth is enabled.
Send chat text (MESSAGE channels)
POST /v1/messages/sendUse /send to deliver plain chat text on a registered MESSAGE channel (not a
prompt card). See Messages for list, get, and send API
details.
Platform credentials
See the Platforms section for per-platform credential tables and portal setup.