Send transport
Delivers text, attachments and actions to one channel on a connected chat transport — discord, github, linear, slack, teams, telegram or whatsapp — and answers that transport's own receipt, the messageId it assigned and the Unix second it landed.
POST /v1/transport/{transport}/send
| Address | https://api.hanzo.ai/v1/transport/{transport}/send |
| Method | POST |
| Operation | post_transport_by_transport_send |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Delivers text, attachments and actions to one channel on a connected chat transport — discord, github, linear, slack, teams, telegram or whatsapp — and answers that transport's own receipt, the messageId it assigned and the Unix second it landed. An unknown transport is a 404.
The body is the envelope's NARROW outbound projection: channel, text, attachments, actions, replyTo and idempotency, and nothing else. Identity is not a field — the transport is the path segment and the sender is the caller's validated org — so a body carrying sender, account or transport is refused with 400 rather than having it silently dropped. channel.id is required, and so is something to say: text, or at least one attachment.
Requires a validated principal; 401 without one. The channel must already belong to the caller's org — each transport verifies the binding itself, so a channel this org has not bound is 403 and a channel whose route the bot has never learned is 409, meaning someone has to message the bot there first. A route learned only so a pairing reply could be delivered lasts exactly as long as that pairing request does, so a channel whose sender was never approved goes back to 409 within the hour. A transport that fails answers 502 carrying status and shape only, never a token.
Sending is at-most-once only if you ask for it: pass an idempotency string and a replay answers 200 with the PRIOR receipt instead of sending twice, while a send that fails releases the key so the caller can re-attempt. Bodies over 1 MiB are refused. Every transport currently renders text only, so attachments and actions are flattened deterministically to one line each after the text rather than dropped.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
transport | path | string | yes |
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo transport send <transport>import { Configuration, TransportApi } from 'hanzoai';
const api = new TransportApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTransportByTransportSend({ transport: 'transport' });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).post_transport_by_transport_send(transport='transport')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.TransportAPI.PostTransportByTransportSend(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::post_transport_by_transport_send(&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).postTransportByTransportSend();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 POST https://api.hanzo.ai/v1/transport/<transport>/send \
-H "Authorization: Bearer $HANZO_API_KEY"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"
}
}
}'