Replace allowlist

Edits the caller org's access policy for one transport and answers the policy as GET would, so both verbs return ONE shape.

PUT /v1/transport/allowlist

Addresshttps://api.hanzo.ai/v1/transport/allowlist
MethodPUT
Operationput_transport_allowlist
AuthAuthorization: Bearer $HANZO_API_KEY

Edits the caller org's access policy for one transport and answers the policy as GET would, so both verbs return ONE shape. It requires ORG ADMIN. Every field but transport is optional and applied only when provided: an empty policy string leaves that policy alone, an absent or null list leaves that list alone, and an EMPTY list clears it. It writes only CONFIG-sourced allow entries — senders approved through pairing belong to the approval flow, so a policy edit can never revoke one. An unknown transport is a 404.

Request

8 fields, body application/json (required).

FieldInTypeRequiredDescription
accessGroupsbodyobject—AccessGroups REPLACES the org's named access groups, as group name -> transport -> entries.
accessGroups.*bodyobject—
accessGroups.*.*bodystring[]—
dmbodystring[]—DM REPLACES the config-managed DM allow entries.
dmPolicybodystring—DMPolicy sets how direct messages are admitted: "pairing" (a person must be approved first), "allowlist" (only listed senders) or "open".
groupbodystring[]—Group REPLACES the config-managed group allow entries.
groupPolicybodystring—GroupPolicy sets how group and thread channels are admitted: "open", "allowlist" or "disabled".
transportbodystring—Transport is the transport to edit: discord, github, linear, slack, teams, telegram or whatsapp.

Response

StatusBodyMeaning
200transport.allowlistViewok
defaultproblem-detailsrefused

200 body — 8 fields.

FieldInTypeAlwaysDescription
accessGroupsbodyobject—AccessGroups is the org's named sender sets, as group name -> transport -> member entries, held once for the whole org.
accessGroups.*bodyobject—
accessGroups.*.*bodystring[]—
dmbodystring[]—DM is the CONFIG-managed DM allow entries — the list PUT /v1/transport/allowlist owns and replaces wholesale.
dmPolicybodystring—DMPolicy decides every inbound DIRECT message, defaulting to "pairing" when the org has never set one.
groupbodystring[]—Group is the CONFIG-managed group allow entries, consulted only while GroupPolicy is "allowlist".
groupPolicybodystring—GroupPolicy decides every inbound GROUP or THREAD message — a thread is a group surface — defaulting to "open".
pairedbodystring[]—Paired is the senders admitted by PAIRING — the entries POST /v1/transport/pairing/approve minted, DM scope only.

Failure carries the platform error shape — see Errors.

Examples

hanzo transport allowlist replace
import { Configuration, TransportApi } from 'hanzoai';

const api = new TransportApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putTransportAllowlist({ accessGroups: {}, dm: ["<dm>"] });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TransportApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TransportApi(client).put_transport_allowlist(access_groups={}, dm=["<dm>"])
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TransportAPI.PutTransportAllowlist(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, transport_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = transport_api::put_transport_allowlist(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TransportApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new TransportApi(client).putTransportAllowlist();

The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were 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 -X PUT https://api.hanzo.ai/v1/transport/allowlist \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "accessGroups": {},
       "dm": [
         "<dm>"
       ]
     }'

MCP reaches transport through the transport tool, which names its 8 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_transports"
         }
       }
     }'

Transport API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.