Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Moderation → Query Flags

AI-generated

Summary

Query moderation flags in Stream Chat using a flexible MongoDB-style filter and limit the number of returned results.

Inputs

  • Filter Query — JSON string with a MongoDB-style query to filter moderation flags (e.g., {"created_by_automod": true}, {"user_id": "specific_user"}, {"created_at": {"$gte": "2023-01-01"}}). Defaults to '{}' to return all flags.
  • Limit — Maximum number of moderation flags to return. Must be at least 1. Defaults to 50.

Output shape

a list of moderation flag objects matching the query filter

The operation returns an array of flags matching the specified filter query, up to the given limit. Results may vary in size depending on filter specificity and limit. No pagination is specified in this operation.

Examples

Example 1: Retrieve up to 10 flags created by automod

Set Filter Query to '{"created_by_automod": true}' and Limit to 10

Discussion