Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Message → Send

AI-generated

Summary

Send a message to a specified Stream Chat channel as a specific user.

Inputs

  • Message Text — The text content of the message to send, supporting plain text and markdown. For rich content, use message attachments or custom data fields.
  • Channel CID (required) — The channel identifier in the format "type:id" (e.g., "messaging:general") where the message will be posted.
  • User ID (Sender) (required) — The user ID of the sender who must exist in the Stream Chat app. The message will appear as sent by this user.

Output shape

a single JSON object representing the posted message response from the Stream Chat API.

If the operation fails, an error object is returned if 'Continue On Fail' is enabled. Channel CID must be formatted correctly as 'type:id' and sender user must exist.

Examples

Example 1: Send a markdown message "Hello, *world*!" in the channel "messaging:general" from user "user123".

Set Channel CID to "messaging:general", Message Text to "Hello, world!", and User ID (Sender) to "user123".

Discussion