Channel
One inbox for the chat apps you connect — Discord, Slack, Teams, Telegram.
Also for this capability: API · CLI · MCP · SDKs
One inbox for the chat apps you connect — Discord, Slack, Teams, Telegram.
| Base URL | https://api.hanzo.ai |
| Operations | 9 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Specification
Specification pending — no HIP in hanzoai/hips declares capability: channel yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.
Four surfaces
| Surface | Reaches this capability as | Coverage |
|---|---|---|
| REST | channel at its own prefix | 9 operations |
| CLI | hanzo channel … | 9 of 9 |
| SDK | — | no published client declares one yet — regenerating the clients is what adds them |
| MCP | tool channels on https://api.hanzo.ai/v1/mcp | 7 operations, 3 under the document's own id — ask describe for the rest |
Quickstart
export HANZO_API_KEY=sk-... # console.hanzo.ai → API keysThen the first call — a read that needs nothing but the key. GET /v1/channel, operation get_channel:
hanzo channel listimport { Configuration, ChannelApi } from 'hanzoai';
const api = new ChannelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getChannel();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ChannelApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ChannelApi(client).get_channel()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ChannelAPI.GetChannel(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, channel_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = channel_api::get_channel(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ChannelApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new ChannelApi(client).getChannel();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/channel \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches channel through the channels tool, which names its 7 operations with its own verbs — this one among them, under a name only MCP 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"
}
}
}'Answers 200 with object — ok.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/channel/{channel}/send | Send a message from your org's bot to one chat room |
GET /v1/channel/agent | Returns which agent answers the caller org's channel: the default and every room bound to another agent. |
PUT /v1/channel/agent | Binds agents to the caller org's channel and answers the bindings as GET would. |
GET /v1/channel/allowlist | Returns the caller org's access policy for one channel: whether DMs are pairing-gated, allowlisted or open, whether group rooms are open, allowlisted… |
PUT /v1/channel/allowlist | Edits the caller org's access policy for one channel and answers the policy as GET would, so both verbs return ONE shape. |
GET /v1/channel/inbox | Returns the messages people have sent to the caller org's connected chat bots, oldest first, in the portable envelope shape every transport… |
POST /v1/channel/pairing/approve | Turns one pending pairing code into a standing allow entry, so that person can DM the org's bot on that channel from now on. |
GET /v1/channel/pairing | Returns the pairing requests waiting for the caller org to approve — one per person who messaged a connected bot on a channel whose DM policy is… |
GET /v1/channel | Reports every chat channel this org can send through, and whether it can send through it right now. |
How is this guide?