Create replies

Answers a message in its thread, as the caller.

POST /v1/team/messages/{id}/replies

Addresshttps://api.hanzo.ai/v1/team/messages/{id}/replies
MethodPOST
Operationpost_team_messages_by_id_replies
AuthAuthorization: Bearer $HANZO_API_KEY

Answers a message in its thread, as the caller.

A reply is a thread message attached to the one it answers, written through the Team client's own path: the parent's reply count and last-reply time move with it, the people already in the thread and anyone mentioned are notified, and an agent mentioned in a reply answers in the same thread. A reply cannot itself be replied to — threads are one level deep, as in the Team client.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the message being answered, from the path.
filesbodyteam.teamFileIn[]—Files attaches blobs already uploaded to the space.
files[].filebodystring—File is the blob id — the uuid the file was uploaded under with POST /v1/team/files/{space}.
files[].namebodystring—Name is the file's name as a person should see it.
files[].sizebodyinteger (int64)—Size is the file's length in bytes.
files[].typebodystring—Type is the file's media type, e.g. "image/png".
idbodystring—ID is the message being answered, from the path.
spacebodystring—Space names the space holding it.
textbodystring—Text is the reply, with the same <@account-uuid> mentions a message takes.

Response

StatusBodyMeaning
201team.teamMessagecreated
defaultproblem-detailsrefused

201 body — 21 fields.

FieldInTypeAlwaysDescription
authorbodystring—Author is the team account uuid that wrote it.
channelbodystring—Channel is the channel it was said in — the same id the channel listing answers with, so a caller holding a message can name its channel without a second read.
createdOnbodyinteger (int64)—CreatedOn is unix MILLIseconds, which is what the platform stamps.
docbodystring—Doc is the document this message is a comment on.
editedOnbodyinteger (int64)—EditedOn is when the author last edited the message, unix milliseconds.
filesbodyteam.teamFile[]—Files are the files attached to the message.
files[].filebodystring—File is the blob id, readable at GET /v1/team/files/{space}/{name}?file={file}.
files[].idbodystring—ID is the attachment document's own id.
files[].namebodystring—Name is the file's name as the person uploaded it.
files[].sizebodyinteger (int64)—Size is the file's length in bytes, as the uploader stated it.
files[].typebodystring—Type is the media type the uploader declared.
idbodystring—ID is the message document's own id.
lastReplybodyinteger (int64)—LastReply is when the thread was last answered, unix milliseconds.
mentionsbodystring[]—Mentions are the account uuids the message @-mentions — exactly the people notify.go told they were mentioned.
reactionsbodyteam.teamReaction[]—Reactions are the emoji people reacted with, one entry per emoji, in the order each emoji was first used.
reactions[].accountsbodystring[]—Accounts are the account uuids that reacted with it, earliest first.
reactions[].countbodyinteger (int64)—Count is how many people reacted with it.
reactions[].emojibodystring—Emoji is the reaction itself, as the person picked it.
repliesbodyinteger (int64)—Replies is how many replies the message's thread holds.
textbodystring—Text is the message as PLAIN TEXT.
threadbodystring—Thread is the message this one replies to.

Failure carries the platform error shape — see Errors.

Examples

hanzo team messages replies create <id>
import { Configuration, TeamApi } from 'hanzoai';

const api = new TeamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postTeamMessagesByIdReplies({ id: 'id', files: [{"file":"<file>","name":"<name>","size":0,"type":"<type>"}], id: "<id>" });
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).post_team_messages_by_id_replies(id='id', files=[{"file":"<file>","name":"<name>","size":0,"type":"<type>"}], id="<id>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TeamAPI.PostTeamMessagesByIdReplies(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::post_team_messages_by_id_replies(&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).postTeamMessagesByIdReplies();
curl -X POST https://api.hanzo.ai/v1/team/messages/<id>/replies \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "files": [
         {
           "file": "<file>",
           "name": "<name>",
           "size": 0,
           "type": "<type>"
         }
       ],
       "id": "<id>"
     }'

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?
Broken link or missing step? Drop it in #docs on Discord or open a PR.