Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Channel → Mute

AI-generated

Summary

Mute a specified user in a specified channel for a configurable duration in minutes, preventing them from sending messages or notifications in that channel during the mute period.

Inputs

  • Channel Type — Type of the channel, such as "messaging" (1-on-1 chats), "team" (group channels), or "livestream" (broadcast channels). Defaults to "messaging".
  • Channel ID (required) — Unique identifier of the channel (e.g., "general", "random", "team-alpha") used along with Channel Type to identify the channel.
  • User ID (required) — ID of the user to mute for server-side operation.
  • Mute Expiration (Minutes) — Duration in minutes for which the mute will last. Defaults to 60 minutes.

Output shape

A single JSON object representing the updated mute state of the channel for the user, including mute details such as expiration time.

The operation returns the API response from Stream Chat's mute call for the specified user and channel. Errors will be thrown if parameters are invalid or operation fails.

Discussion