Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Channel → Invite Members

AI-generated

Summary

Invite specified users to join an existing Stream Chat channel defined by its type and ID.

Inputs

  • Channel Type — Type of the channel, such as 'messaging' (1-on-1), 'team' (group), or 'livestream' (broadcast). Defaults to 'messaging'.
  • Channel ID (required) — Unique identifier of the channel to invite members to (e.g., 'general', 'random').
  • Members (required) — Comma-separated list of user IDs to invite to the channel (e.g., 'john_doe,jane_smith'). No spaces around commas.

Output shape

a single JSON object

Returns the response from the Stream Chat API after inviting members to the channel. The output includes details about the invitation operation and the channel state as returned by the API.

Examples

Example 1: Invite two users john_doe and jane_smith to the 'team-alpha' team channel

Set Channel Type to 'team', Channel ID to 'team-alpha', and Members to 'john_doe,jane_smith'

Discussion