Reports every chat channel this org can send through, and whether it can send…
Reports every chat channel this org can send through, and whether it can send through it right now.
GET /v1/channels
| Address | https://api.hanzo.ai/v1/channels |
| Method | GET |
| Operation | get_channels |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reports every chat channel this org can send through, and whether it can send through it right now.
A channel appears here whether or not it is connected — an empty list would leave a caller unable to tell "this org has no Slack" from "Slack is down", which are different problems with different fixes. Each entry carries the connection behind it, so the answer to "why can I not post?" is in the same response as the channel that cannot post.
Request
GET /v1/channels takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | chatChannels | ok |
200 body — 14 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
channels | body | channelView[] | — | Channels is every chat transport this deployment supports, in a fixed order, each carrying whether the org has connected it, the account behind the connection,… |
channels[].account | body | string | — | Account is the id-shaped fact about that connection: the lowercased external id integrations custodies for it — a Discord guild id, a Slack team (workspace)… |
channels[].accountLabel | body | string | — | AccountLabel is the human label of that same account — the Discord guild name, the Slack team name, the Teams tenant name (falling back to the tenant id), the… |
channels[].capabilities | body | capabilities | — | |
channels[].capabilities.actions | body | boolean | — | Actions is whether the transport renders an INTERACTIVE control natively, and it is the flag to read before composing one. |
channels[].capabilities.dm | body | boolean | — | DM is whether the transport carries a DIRECT message at all. True for slack, teams and telegram. |
channels[].capabilities.group | body | boolean | — | Group is whether the transport carries multi-person rooms — a Discord guild channel, a Slack channel, a Teams channel or group chat, a Telegram group or… |
channels[].capabilities.media | body | boolean | — | Media is whether the transport renders an ATTACHMENT natively. |
channels[].capabilities.thread | body | boolean | — | Thread is whether a reply can be threaded UNDER a specific message. |
channels[].connected | body | boolean | — | Connected is whether integrations holds a connection for (this org, this transport) — whether someone finished its connect flow. |
channels[].dmPolicy | body | string | — | DMPolicy is how this org admits direct messages here: "pairing", "allowlist" or "open", defaulting to "pairing" when the org has never set one. |
channels[].groupPolicy | body | string | — | GroupPolicy is how this org admits group and thread rooms here: "open", "allowlist" or "disabled", defaulting to "open". |
channels[].id | body | string | — | ID is the fixed transport identifier — discord, slack, teams or telegram — and the value every route on this surface names a channel by, including the… |
channels[].pendingPairing | body | integer | — | PendingPairing counts the org's UNEXPIRED pairing requests on this channel: exactly the rows GET /v1/channels/pairing returns for it, one per person waiting on… |
Failure carries the platform error shape — see Errors.
Examples
hanzo channels listimport { Configuration, ChannelsApi } from 'hanzoai';
const api = new ChannelsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getChannels();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ChannelsApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ChannelsApi(client).get_channels()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ChannelsAPI.GetChannels(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, channels_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = channels_api::get_channels(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ChannelsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new ChannelsApi(client).getChannels();curl https://api.hanzo.ai/v1/channels \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches channels through the channels tool, which names its 7 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_channels"
}
}
}'How is this guide?