Returns the caller org's access policy for one channel: whether DMs are…
Returns the caller org's access policy for one channel: whether DMs are pairing-gated, allowlisted or open, whether group rooms are open, allowlisted or…
GET /v1/channels/allowlist
| Address | https://api.hanzo.ai/v1/channels/allowlist |
| Method | GET |
| Operation | get_channels_allowlist |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller org's access policy for one channel: whether DMs are pairing-gated, allowlisted or open, whether group rooms are open, allowlisted or disabled, the config-managed DM and group allow entries, the senders approved through PAIRING (read-only here), and the org's named access groups. An unknown channel is a 404.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
channel | query | string | — | Channel is the transport to read: discord, slack, teams or telegram. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | allowlistView | ok |
200 body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
accessGroups | body | object | — | AccessGroups is the org's named sender sets, as group name -> channel -> member entries, held once for the whole org. |
accessGroups.* | body | object | — | |
accessGroups.*.* | body | string[] | — | |
dm | body | string[] | — | DM is the CONFIG-managed DM allow entries — the list PUT /v1/channels/allowlist owns and replaces wholesale. |
dmPolicy | body | string | — | DMPolicy decides every inbound DIRECT message, defaulting to "pairing" when the org has never set one. |
group | body | string[] | — | Group is the CONFIG-managed group allow entries, consulted only while GroupPolicy is "allowlist". |
groupPolicy | body | string | — | GroupPolicy decides every inbound GROUP or THREAD message — a thread is a group surface — defaulting to "open". "open" admits every sender in the room. |
paired | body | string[] | — | Paired is the senders admitted by PAIRING — the entries POST /v1/channels/pairing/approve minted, DM scope only. |
Failure carries the platform error shape — see Errors.
Examples
hanzo channels allowlist getimport { Configuration, ChannelsApi } from 'hanzoai';
const api = new ChannelsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getChannelsAllowlist();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_allowlist()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ChannelsAPI.GetChannelsAllowlist(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_allowlist(&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).getChannelsAllowlist();curl https://api.hanzo.ai/v1/channels/allowlist \
-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?