Hanzo AI

Update messages

Rewrites what a message says.

PATCH /v1/team/messages/{id}

Addresshttps://api.hanzo.ai/v1/team/messages/{id}
MethodPATCH
Operationpatch_team_messages_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Rewrites what a message says. Only its author may edit it.

The edit is an ordinary update of the message document through the Team client's own write path, stamped with editedOn, so an open client shows the new text and the "edited" mark live. Somebody the new text mentions for the first time is notified.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the message, from the path.
idbodystring—ID is the message, from the path.
spacebodystring—Space names the space holding it.
textbodystring—Text is the message's new text, with the same <@account-uuid> mentions a new message takes.

Response

StatusBodyMeaning
200team.teamMessageok
defaultproblem-detailsrefused

200 body — 21 fields.

FieldInTypeAlwaysDescription
authorbodystring—Author is the team account uuid that wrote it.
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.
roombodystring—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.
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 has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Team API · All Hanzo APIs · Interactive reference

How is this guide?

On this page