List inbox
Returns the caller's notifications, newest first, each with the room or document it is about and the message that caused it.
GET /v1/team/inbox
| Address | https://api.hanzo.ai/v1/team/inbox |
| Method | GET |
| Operation | get_team_inbox |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller's notifications, newest first, each with the room or document it is about and the message that caused it.
These are the rows the Team client's Inbox reads, so a notification cleared there is cleared here. Only the caller's own notifications are ever listed.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
space | query | string | — | Space is the space uuid. |
archived | query | boolean | — | Archived lists the archived notifications instead of the live ones. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | team.teamInbox | ok |
default | problem-details | refused |
200 body — 33 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
items | body | team.teamInboxItem[] | — | Items are the notifications, newest first, at most 200. |
items[].archived | body | boolean | — | Archived reports that the caller archived it. |
items[].createdOn | body | integer (int64) | — | CreatedOn is when it was filed, unix milliseconds. |
items[].doc | body | string | — | Doc is the document it is about, when it is about a document. |
items[].id | body | string | — | ID is the notification's own id — what read and archive address. |
items[].message | body | team.teamMessage | — | |
items[].message.author | body | string | — | Author is the team account uuid that wrote it. |
items[].message.createdOn | body | integer (int64) | — | CreatedOn is unix MILLIseconds, which is what the platform stamps. |
items[].message.doc | body | string | — | Doc is the document this message is a comment on. |
items[].message.editedOn | body | integer (int64) | — | EditedOn is when the author last edited the message, unix milliseconds. |
items[].message.files | body | team.teamFile[] | — | Files are the files attached to the message. |
items[].message.files[].file | body | string | — | File is the blob id, readable at GET /v1/team/files/{space}/{name}?file={file}. |
items[].message.files[].id | body | string | — | ID is the attachment document's own id. |
items[].message.files[].name | body | string | — | Name is the file's name as the person uploaded it. |
items[].message.files[].size | body | integer (int64) | — | Size is the file's length in bytes, as the uploader stated it. |
items[].message.files[].type | body | string | — | Type is the media type the uploader declared. |
items[].message.id | body | string | — | ID is the message document's own id. |
items[].message.lastReply | body | integer (int64) | — | LastReply is when the thread was last answered, unix milliseconds. |
items[].message.mentions | body | string[] | — | Mentions are the account uuids the message @-mentions — exactly the people notify.go told they were mentioned. |
items[].message.reactions | body | team.teamReaction[] | — | Reactions are the emoji people reacted with, one entry per emoji, in the order each emoji was first used. |
items[].message.reactions[].accounts | body | string[] | — | Accounts are the account uuids that reacted with it, earliest first. |
items[].message.reactions[].count | body | integer (int64) | — | Count is how many people reacted with it. |
items[].message.reactions[].emoji | body | string | — | Emoji is the reaction itself, as the person picked it. |
items[].message.replies | body | integer (int64) | — | Replies is how many replies the message's thread holds. |
items[].message.room | body | string | — | Room is the room it was said in — the same id the room listing answers with, so a caller holding a message can name its room without a second read. |
items[].message.text | body | string | — | Text is the message as PLAIN TEXT. |
items[].message.thread | body | string | — | Thread is the message this one replies to. |
items[].read | body | boolean | — | Read reports that the caller has seen it. |
items[].reason | body | string | — | Reason is why it was filed: "mention", "dm" (a direct message), "reply" (in a thread the caller is in), "comment" (on something the caller follows), "assigned", or "other". |
items[].room | body | string | — | Room is the room it is about, when it is about a room. |
items[].space | body | string | — | Space is the space uuid it was filed in. |
items[].thread | body | string | — | Thread is the message whose thread it is about, for a reply. |
unread | body | integer (int64) | — | Unread is how many of the caller's live (unarchived) notifications are unread — the number a badge shows, counted over all of them rather than the page. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, TeamApi } from 'hanzoai';
const api = new TeamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTeamInbox();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TeamApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TeamApi(client).get_team_inbox()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.TeamAPI.GetTeamInbox(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, team_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = team_api::get_team_inbox(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TeamApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new TeamApi(client).getTeamInbox();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 https://api.hanzo.ai/v1/team/inbox \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches team through the team tool, which names its 18 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": "get_collaborator"
}
}
}'How is this guide?