List 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

Addresshttps://api.hanzo.ai/v1/channel/inbox
MethodGET
Operationget_channel_inbox
AuthAuthorization: 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.

FieldInTypeRequiredDescription
sincequerystring—Since is the exclusive cursor: only messages with a higher row id come back.
limitquerystring—Limit caps how many messages come back.

Response

StatusBodyMeaning
200channel.inboxPageok
defaultproblem-detailsrefused

200 body — 12 fields.

FieldInTypeAlwaysDescription
cursorbodyinteger (int64)—Cursor is the row id to pass back as since for the next page.
messagesbodychannel.inboxView[]—Messages are the inbound messages, oldest first.
messages[].accountbodystring—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[].channelbodystring—Channel is the transport this message arrived on — discord, slack, teams or telegram — and the :channel segment to reply through.
messages[].createdAtbodyinteger (int64)—CreatedAt is Unix SECONDS, stamped by the ingest goroutine when the message was accepted — not the transport's own send time.
messages[].idbodyinteger (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[].replyTobodystring—ReplyTo is the transport's reply target for this message: Slack's thread_ts, or the Telegram message id it arrived as.
messages[].roomIdbodystring—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[].roomKindbodystring—RoomKind is how ingest classified the room: "dm", "group" or "thread".
messages[].senderbodystring—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[].senderUserbodystring—SenderUser is the HANZO account subject that chat identity is linked to, resolved at ingest through the org's user link.
messages[].textbodystring—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.

Examples

hanzo channel inbox
import { Configuration, ChannelApi } from 'hanzoai';

const api = new ChannelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getChannelInbox();
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()
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
}
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?;
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();
curl https://api.hanzo.ai/v1/channel/inbox \
  -H "Authorization: Bearer $HANZO_API_KEY"

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

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 · All Hanzo APIs · Interactive reference

Was this page useful?