# List inbox

URL: https://docs.hanzo.ai/docs/openapi/channel/get-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 normalises into.

`GET /v1/channel/inbox`

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

|               |                                         |
| ------------- | --------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/channel/inbox` |
| **Method**    | `GET`                                   |
| **Operation** | `get_channel_inbox`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`  |

Returns the messages people have sent to the caller org's connected chat
bots, oldest first, in the portable envelope shape every transport normalises
into. It is a CURSOR feed, not a search: pass the returned cursor back as
`since` to get only what has arrived since. Only this org's messages are
stored under this org, so the feed can never carry another tenant's chat.

## Request

2 fields.

| Field   | In    | Type   | Required | Description                                                                  |
| ------- | ----- | ------ | -------- | ---------------------------------------------------------------------------- |
| `since` | query | string | —        | Since is the exclusive cursor: only messages with a higher row id come back. |
| `limit` | query | string | —        | Limit caps how many messages come back.                                      |

## Response

| Status    | Body              | Meaning |
| --------- | ----------------- | ------- |
| `200`     | channel.inboxPage | ok      |
| `default` | problem-details   | refused |

`200` body — 12 fields.

| Field                   | In   | Type                 | Always | Description                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------- | ---- | -------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`                | body | integer (int64)      | —      | Cursor is the row id to pass back as `since` for the next page.                                                                                                                                                                                                                                                                                                                  |
| `messages`              | body | channel.inboxView\[] | —      | Messages are the inbound messages, oldest first.                                                                                                                                                                                                                                                                                                                                 |
| `messages[].account`    | body | string               | —      | Account is the lowercased external id of the org's connected account on that transport: the Discord guild id, the Slack team id, the Teams AAD tenant id, or the bound Telegram chat id.                                                                                                                                                                                         |
| `messages[].channel`    | body | string               | —      | Channel is the transport this message arrived on — discord, slack, teams or telegram — and the `:channel` segment to reply through.                                                                                                                                                                                                                                              |
| `messages[].createdAt`  | body | integer (int64)      | —      | CreatedAt is Unix SECONDS, stamped by the ingest goroutine when the message was accepted — not the transport's own send time.                                                                                                                                                                                                                                                    |
| `messages[].id`         | body | integer (int64)      | —      | ID is the store's row id, assigned on insert — SERVER-SET, and the cursor: pass a page's last id back as `since`.                                                                                                                                                                                                                                                                |
| `messages[].replyTo`    | body | string               | —      | ReplyTo is the transport's reply target for this message: Slack's thread\_ts, or the Telegram message id it arrived as.                                                                                                                                                                                                                                                          |
| `messages[].roomId`     | body | string               | —      | RoomID is the conversation on the ORIGINATING transport, and the value to send back as `room.id`: a Discord channel snowflake, a Slack conversation id (D… IM, C… public channel, G… private or mpim), a Teams conversation id (19:…@thread.… for a channel or group chat, a:… for a personal chat), or a Telegram chat id in decimal (negative for a group, positive for a DM). |
| `messages[].roomKind`   | body | string               | —      | RoomKind is how ingest classified the room: "dm", "group" or "thread".                                                                                                                                                                                                                                                                                                           |
| `messages[].sender`     | body | string               | —      | Sender is the TRANSPORT-NATIVE user id of whoever wrote the message — a Discord member.user.id, a Slack U… user id, a Teams aadObjectId (falling back to from.id), a Telegram from.id in decimal.                                                                                                                                                                                |
| `messages[].senderUser` | body | string               | —      | SenderUser is the HANZO account subject that chat identity is linked to, resolved at ingest through the org's user link.                                                                                                                                                                                                                                                         |
| `messages[].text`       | body | string               | —      | Text is the body as the transport delivered it, with the bot mention already stripped by the ingress adapter (on Discord it is the /hanzo prompt argument, since that ingress is slash commands only), truncated to 8 KiB on store.                                                                                                                                              |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo channel inbox
```

**SDK**

**.ts**

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

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

**.py**

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

**.go**

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

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

**.rs**

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

**.java**

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

**HTTP**

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

**MCP**

Tool `channel`, op `get_channel_inbox` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "channel",
         "arguments": {
           "op": "get_channel_inbox",
           "input": {}
         }
       }
     }'
```

---

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