Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Moderation → Query Banned Users

AI-generated

Summary

Query banned users in the Stream Chat moderation system using customizable JSON filters and limit the number of results returned.

Inputs

  • Filter Query — A JSON string representing a MongoDB-style query to filter banned users, such as filtering by user ID, creation date, or other attributes (e.g., {"banned": true}).
  • Limit — A number indicating the maximum number of banned user results to return, minimum is 1, default is 50.

Output shape

a list of banned user records matching the filter criteria

Supports MongoDB-style query filters for flexible searching within banned users. The result set is limited by the specified maximum limit. Results are returned as JSON objects.

Examples

Example 1: List up to 20 banned users banned since January 1, 2023

Set Filter Query to {"created_at": {"$gte": "2023-01-01"}} and Limit to 20.

Discussion