List events

Holds one text/event-stream open per caller and pushes each change as it is written — by the Team client, a typed op or an agent — filtered to the rooms, documents and inbox the caller may see under the same rule the ops apply.

GET /v1/team/events

Addresshttps://api.hanzo.ai/v1/team/events
MethodGET
Operationget_team_events
AuthAuthorization: Bearer $HANZO_API_KEY

Holds one text/event-stream open per caller and pushes each change as it is written — by the Team client, a typed op or an agent — filtered to the rooms, documents and inbox the caller may see under the same rule the ops apply. Authenticate with Authorization: Bearer (a fetch-based SSE reader; a browser EventSource cannot set it). ?space= narrows the stream to one space; without it the stream covers every space the caller is a member of at connect.

Each frame is event: <name> and a JSON data: line carrying space and one of:

  • message.created, message.updated — message, the message as the message ops answer it (a room message, a thread reply or a document comment; a count or reaction change is an update);
  • message.deleted — id, and room/doc/thread where known;
  • reaction.changed — message, with its reactions as they now stand;
  • room.changed — room, as the room listing answers it, sent to those who can see it after the change (somebody removed from a private room is not told; the room list is the truth);
  • doc.changed — doc, as the document ops answer it (removed: true and id when deleted); body edits happen on the collaborator socket and are not streamed here;
  • inbox.created, inbox.updated — item, one of the caller's own notifications.

A : ping comment is written every 25 seconds. There is no resume: the server keeps no event sequence, so frames carry no id and Last-Event-ID is ignored; on reconnect, re-read the ops. A stream that falls too far behind is closed rather than allowed to slow a writer, and so is one whose caller is no longer a member of the space an event is in. 401 without a verified team credential; 404 for a named space the caller is not in.

Request

GET /v1/team/events takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
2XXstringSuccess

2XX body — 1 field.

FieldInTypeAlwaysDescription
(body)bodystring (binary)yes

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.getTeamEvents();
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_events()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TeamAPI.GetTeamEvents(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_events(&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).getTeamEvents();
curl https://api.hanzo.ai/v1/team/events \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches team through the team tool, which names its 33 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_team_account_providers"
         }
       }
     }'

Team API · All Hanzo APIs · Interactive reference

Was this page useful?