Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Message → Update

AI-generated

Summary

Update a specific message in a Stream Chat channel by providing its Message ID along with the new message data to modify its content or properties.

Inputs

  • Message ID (required) — The unique identifier of the message to update.
  • Message Data — A JSON object containing the message data fields to update (e.g., { "text": "Updated message" }).
  • Message Text — The new text content for the message supporting plain text and markdown. For rich content, use attachments or custom data fields.

Output shape

a single record containing the updated message object as JSON

The operation requires a valid Message ID and optionally accepts either raw 'text' or a JSON 'messageData' object for updates. The returned JSON contains the updated message details or an error message if the update fails.

Examples

Example 1: Update the text content of a message

Set 'Message ID' to the ID of the existing message and 'Message Data' to {"text": "Updated message text"}.

Discussion