Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Channel → Delete Image

AI-generated

Summary

Delete an image from a specified channel in Stream Chat by providing the channel type, channel ID, and the URL of the image to be deleted.

Inputs

  • Channel Type — Type of the channel such as 'messaging', 'team', or 'livestream'. Defaults to 'messaging' if not specified.
  • Channel ID (required) — Unique identifier for the channel (e.g., 'general', 'random'). Combined with the channel type to form the full channel ID (CID).
  • File URL (required) — URL of the image file to delete from the channel.

Output shape

a single record containing the API response to the delete image request

The output JSON reflects the result of the delete image operation from the Stream Chat API. Errors are returned as error messages in the output if the deletion fails.

Examples

Example 1: Delete an image from a channel

Set Channel Type as 'messaging', specify the Channel ID as 'general', and input the File URL pointing to the image you want to delete.

Discussion