action stream_io_api_query_banned_users { label: "Query Banned Users" description: "Find and filter channel scoped or global user bans" provider: stream_io_api method: GET path: "/query_banned_users" encoding: json input: { type: "object" properties: { payload: { type: "string" } } additionalProperties: false } output: { type: "object" required: ["bans", "duration"] properties: { bans: { type: "array" items: { type: "object" required: ["created_at"] properties: { banned_by: { type: "object" description: "Represents chat user" required: ["id", "role", "banned", "online"] properties: { ban_expires: { type: "string" format: "date-time" description: "Expiration date of the ban" } banned: { type: "boolean" description: "Whether a user is banned or not" } created_at: { type: "string" format: "date-time" description: "Date/time of creation" } deactivated_at: { type: "string" format: "date-time" description: "Date of deactivation" } deleted_at: { type: "string" format: "date-time" description: "Date/time of deletion" } id: { type: "string" description: "Unique user identifier" } invisible: { type: "boolean" } language: { type: "string" description: "Preferred language of a user" } last_active: { type: "string" format: "date-time" description: "Date of last activity" } online: { type: "boolean" description: "Whether a user online or not" } push_notifications: { type: "object" properties: { disabled: { type: "boolean" } disabled_until: { type: "string" format: "date-time" } } } revoke_tokens_issued_before: { type: "string" format: "date-time" description: "Revocation date for tokens" } role: { type: "string" description: "Determines the set of user permissions" } teams: { type: "array" description: "List of teams user is a part of" items: { type: "string" } } updated_at: { type: "string" format: "date-time" description: "Date/time of the last update" } } } channel: { type: "object" description: "Represents channel in chat" required: ["id", "type", "cid", "frozen", "disabled"] properties: { auto_translation_enabled: { type: "boolean" description: "Whether auto translation is enabled or not" } auto_translation_language: { type: "string" description: "Language to translate to when auto translation is active" } cid: { type: "string" description: "Channel CID (:)" } config: { type: "object" required: ["created_at", "updated_at", "name", "typing_events", "read_events", "connect_events", "search", "reactions", "replies", "quotes", "mutes", "uploads", "url_enrichment", "custom_events", "push_notifications", "reminders", "message_retention", "max_message_length", "automod", "automod_behavior", "commands"] properties: { automod: { type: "string" enum: ["disabled", "simple", "AI"] } automod_behavior: { type: "string" enum: ["flag", "block"] } automod_thresholds: { type: "object" description: "Sets thresholds for AI moderation" properties: { explicit: { type: "object" properties: { block: { type: "number" format: "float" description: "Threshold for automatic message block" } flag: { type: "number" format: "float" description: "Threshold for automatic message flag" } } } spam: { type: "object" additionalProperties: true } toxic: { type: "object" additionalProperties: true } } } blocklist: { type: "string" } blocklist_behavior: { type: "string" enum: ["flag", "block"] } commands: { type: "array" items: { type: "object" description: "Represents custom chat command" required: ["name", "description", "args", "set"] properties: { args: { type: "string" description: "Arguments help text, shown in commands auto-completion" } created_at: { type: "string" format: "date-time" description: "Date/time of creation" } description: { type: "string" description: "Description, shown in commands auto-completion" } name: { type: "string" description: "Unique command name" } set: { type: "string" description: "Set name used for grouping commands" } updated_at: { type: "string" format: "date-time" description: "Date/time of the last update" } } } } connect_events: { type: "boolean" } created_at: { type: "string" format: "date-time" } custom_events: { type: "boolean" } grants: { type: "object" } max_message_length: { type: "number" } message_retention: { type: "string" } mutes: { type: "boolean" } name: { type: "string" } push_notifications: { type: "boolean" } quotes: { type: "boolean" } reactions: { type: "boolean" } read_events: { type: "boolean" } reminders: { type: "boolean" } replies: { type: "boolean" } search: { type: "boolean" } typing_events: { type: "boolean" } updated_at: { type: "string" format: "date-time" } uploads: { type: "boolean" } url_enrichment: { type: "boolean" } } } cooldown: { type: "number" description: "Cooldown period after sending each message" } created_at: { type: "string" format: "date-time" description: "Date/time of creation" } created_by: { type: "object" additionalProperties: true } deleted_at: { type: "string" format: "date-time" description: "Date/time of deletion" } disabled: { type: "boolean" } frozen: { type: "boolean" description: "Whether channel is frozen or not" } hidden: { type: "boolean" description: "Whether this channel is hidden by current user or not" } hide_messages_before: { type: "string" format: "date-time" description: "Date since when the message history is accessible" } id: { type: "string" description: "Channel unique ID" } last_message_at: { type: "string" format: "date-time" description: "Date of the last message sent" } member_count: { type: "number" description: "Number of members in the channel" } members: { type: "array" description: "List of channel members (max 100)" items: { type: "object" required: ["created_at", "updated_at", "banned", "shadow_banned", "channel_role"] properties: { ban_expires: { type: "string" format: "date-time" description: "Expiration date of the ban" } banned: { type: "boolean" description: "Whether member is banned this channel or not" } channel_role: { type: "string" description: "Role of the member in the channel" } created_at: { type: "string" format: "date-time" description: "Date/time of creation" } deleted_at: { type: "string" format: "date-time" } invite_accepted_at: { type: "string" format: "date-time" description: "Date when invite was accepted" } invite_rejected_at: { type: "string" format: "date-time" description: "Date when invite was rejected" } invited: { type: "boolean" description: "Whether member was invited or not" } is_moderator: { type: "boolean" description: "Whether member is channel moderator or not" } role: { type: "string" description: "Permission level of the member in the channel (DEPRECATED: use channel_role instead)" enum: ["member", "moderator", "admin", "owner"] } shadow_banned: { type: "boolean" description: "Whether member is shadow banned in this channel or not" } updated_at: { type: "string" format: "date-time" description: "Date/time of the last update" } user: { type: "object" additionalProperties: true } user_id: { type: "string" } } } } mute_expires_at: { type: "string" format: "date-time" description: "Date of mute expiration" } muted: { type: "boolean" description: "Whether this channel is muted or not" } own_capabilities: { type: "array" description: "List of channel capabilities of authenticated user" items: { type: "string" } } team: { type: "string" description: "Team the channel belongs to (multi-tenant only)" } truncated_at: { type: "string" format: "date-time" description: "Date of the latest truncation of the channel" } truncated_by: { type: "object" additionalProperties: true } type: { type: "string" description: "Type of the channel" } updated_at: { type: "string" format: "date-time" description: "Date/time of the last update" } } } created_at: { type: "string" format: "date-time" } expires: { type: "string" format: "date-time" } reason: { type: "string" } shadow: { type: "boolean" } user: { type: "object" additionalProperties: true } } } } duration: { type: "string" description: "Duration of the request in human-readable format" } } } }