Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Channel → Pin

AI-generated

Summary

Pin a channel for a specific user to highlight it within Stream Chat. This operation marks the channel as pinned for easy access and visibility.

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"). Combined with the channel type to form a channel CID.
  • User ID — ID of the user for whom the channel will be pinned. This is used for the server-side operation to pin the channel for that particular user.

Output shape

a single record

Returns the result of the pin operation executed on the specified channel for the given user. Typically includes the updated channel data or an acknowledgment response.

Discussion