# Transport

URL: https://docs.hanzo.ai/docs/openapi/transport

> One inbox for the chat apps you connect — Discord, Slack, Teams, Telegram.

Also for this capability: **API** · [CLI](https://docs.hanzo.ai/docs/cli/transport) · [MCP](https://docs.hanzo.ai/docs/mcp-tools/transport) · [SDKs](https://docs.hanzo.ai/docs/sdks)

One inbox for the chat apps you connect — Discord, Slack, Teams, Telegram.

> [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|                |                                        |
| -------------- | -------------------------------------- |
| **Base URL**   | `https://api.hanzo.ai`                 |
| **Operations** | 9                                      |
| **Auth**       | `Authorization: Bearer $HANZO_API_KEY` |

## Specification

Specification pending — no HIP in [hanzoai/hips](https://github.com/hanzoai/hips) declares `capability: transport` 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** | `transport` at its own prefix                     | 9 operations                                                                      |
| **CLI**  | `hanzo transport …`                               | 9 of 9                                                                            |
| **SDK**  | —                                                 | no published client declares one yet — regenerating the clients is what adds them |
| **MCP**  | tool `transport` on `https://api.hanzo.ai/v1/mcp` | 8 operations, 4 under the document's own id — ask `describe` for the rest         |

## Quickstart

```bash
export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys
```

Then the first call — a read that needs nothing but the key. `GET /v1/transport`, operation `get_transport`:

**CLI**

```bash
hanzo transport list
```

**SDK**

**.ts**

```ts
import { Configuration, TransportApi } from 'hanzoai';

const api = new TransportApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTransport();
```

**.py**

```python
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).get_transport()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TransportAPI.GetTransport(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
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::get_transport(&cfg, Default::default()).await?;
```

**.java**

```java
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).getTransport();
```

The method above is the one at the current release of the document. `hanzoai@8.5.914` (npm) and `hanzoai@8.5.914` (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 →](https://docs.hanzo.ai/docs/sdks)

**HTTP**

```bash
curl https://api.hanzo.ai/v1/transport \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

```bash
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"
         }
       }
     }'
```

Answers `200` with `object` — ok.

## Endpoints

| Endpoint                                                                                                               | What it does                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`POST /v1/transport/{transport}/send`](https://docs.hanzo.ai/docs/openapi/transport/post-transport-by-transport-send) | Send a message from your org's bot to one chat channel                                                                                                                                                                                                                                                           |
| [`GET /v1/transport/agent`](https://docs.hanzo.ai/docs/openapi/transport/get-transport-agent)                          | Returns which agent answers the caller org's transport: the default and every channel bound to another agent.                                                                                                                                                                                                    |
| [`PUT /v1/transport/agent`](https://docs.hanzo.ai/docs/openapi/transport/put-transport-agent)                          | Binds agents to the caller org's transport and answers the bindings as GET would.                                                                                                                                                                                                                                |
| [`GET /v1/transport/allowlist`](https://docs.hanzo.ai/docs/openapi/transport/get-transport-allowlist)                  | Returns the caller org's access policy for one transport: whether DMs are pairing-gated, allowlisted or open, whether group channels 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. |
| [`PUT /v1/transport/allowlist`](https://docs.hanzo.ai/docs/openapi/transport/put-transport-allowlist)                  | Edits the caller org's access policy for one transport and answers the policy as GET would, so both verbs return ONE shape.                                                                                                                                                                                      |
| [`GET /v1/transport/inbox`](https://docs.hanzo.ai/docs/openapi/transport/get-transport-inbox)                          | Returns the caller's own messages to the org's connected chat bots — those recorded on the caller's linked account — oldest first, in the portable envelope shape every transport normalises into.                                                                                                               |
| [`POST /v1/transport/pairing/approve`](https://docs.hanzo.ai/docs/openapi/transport/post-transport-pairing-approve)    | Turns one pending pairing code into a standing allow entry, so that person can DM the org's bot on that transport from now on.                                                                                                                                                                                   |
| [`GET /v1/transport/pairing`](https://docs.hanzo.ai/docs/openapi/transport/get-transport-pairing)                      | Returns the pairing requests waiting for the caller org to approve — one per person who messaged a connected bot on a transport whose DM policy is "pairing" and who is not allowed yet.                                                                                                                         |
| [`GET /v1/transport`](https://docs.hanzo.ai/docs/openapi/transport/get-transport)                                      | Reports every chat transport this org can send through, and whether it can send through it right now.                                                                                                                                                                                                            |

---

[All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
