---
title: "Query Banned Users"
method: GET
path: "/query_banned_users"
tags: ["product:chat"]
---

# Query Banned Users

`GET /query_banned_users`

Find and filter channel scoped or global user bans

## Response `200`

Successful response

- QueryBannedUsersResponse, nullable
  - `bans` BanResponse[], required — List of found bans
    - `banned_by` UserResponse — User response object
      - `avg_response_time` integer
      - `ban_expires` string, date-time — Date when ban expires
      - `banned` boolean, required — Whether a user is banned or not
      - `blocked_user_ids` string[], required
      - `bypass_moderation` boolean
      - `created_at` string, date-time, required — Date/time of creation
      - `custom` object, required — Custom data for this object
      - `deactivated_at` string, date-time — Date of deactivation
      - `deleted_at` string, date-time — Date/time of deletion
      - `devices` DeviceResponse[] — List of devices user is using
        - `created_at` string, date-time, required — Date/time of creation
        - `disabled` boolean — Whether device is disabled or not
        - `disabled_reason` string — Reason explaining why device had been disabled
        - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers
        - `id` string, required — Device ID
        - `push_provider` string, required — Push provider
        - `push_provider_name` string — Push provider name
        - `user_id` string, required — User ID
        - `voip` boolean — When true the token is for Apple VoIP push notifications
      - `id` string, required — Unique user identifier
      - `image` string
      - `invisible` boolean, required
      - `language` string, required — Preferred language of a user
      - `last_active` string, date-time — Date of last activity
      - `name` string — Optional name of user
      - `online` boolean, required — Whether a user online or not
      - `privacy_settings` PrivacySettingsResponse
        - `delivery_receipts` DeliveryReceiptsResponse
          - `enabled` boolean
        - `read_receipts` ReadReceiptsResponse
          - `enabled` boolean
        - `typing_indicators` TypingIndicatorsResponse
          - `enabled` boolean
      - `push_notifications` PushNotificationSettingsResponse
        - `disabled` boolean
        - `disabled_until` string, date-time
      - `revoke_tokens_issued_before` string, date-time — Revocation date for tokens
      - `role` string, required — Determines the set of user permissions
      - `shadow_banned` boolean, required — Whether a user is shadow banned
      - `teams` string[], required — List of teams user is a part of
      - `teams_role` object
      - `updated_at` string, date-time, required — Date/time of the last update
    - `channel` ChannelResponse — Represents channel in chat
      - `auto_translation_enabled` boolean — Whether auto translation is enabled or not
      - `auto_translation_language` string — Language (or comma-separated list of languages) to translate to when auto translation is active
      - `blocked` boolean — Whether this channel is blocked by current user or not
      - `cid` string, required — Channel CID (<type>:<id>)
      - `config` ChannelConfigWithInfo
        - `allowed_flag_reasons` string[]
        - `automod` 'disabled' | 'simple' | 'AI', required
        - `automod_behavior` 'flag' | 'block' | 'shadow_block', required
        - `automod_thresholds` Thresholds — Sets thresholds for AI moderation
          - `explicit` LabelThresholds
            - `block` number, float — Threshold for automatic message block
            - `flag` number, float — Threshold for automatic message flag
          - `spam` LabelThresholds
            - `block` number, float — Threshold for automatic message block
            - `flag` number, float — Threshold for automatic message flag
          - `toxic` LabelThresholds
            - `block` number, float — Threshold for automatic message block
            - `flag` number, float — Threshold for automatic message flag
        - `blocklist` string
        - `blocklist_behavior` 'flag' | 'block' | 'shadow_block'
        - `blocklists` BlockListOptions[]
          - `behavior` 'flag' | 'block' | 'shadow_block', required — Blocklist behavior. One of: flag, block, shadow_block
          - `blocklist` string, required — Blocklist name
        - `chat_preferences` ChatPreferences
          - `channel_mentions` string
          - `default_preference` string
          - `direct_mentions` string
          - `distinct_channel_messages` string
          - `group_mentions` string
          - `here_mentions` string
          - `role_mentions` string
          - `thread_replies` string
        - `commands` Command[], required
          - `args` string, required — Arguments help text, shown in commands auto-completion
          - `created_at` string, date-time — Date/time of creation
          - `description` string, required — Description, shown in commands auto-completion
          - `name` string, required — Unique command name
          - `set` string, required — Set name used for grouping commands
          - `updated_at` string, date-time — Date/time of the last update
        - `connect_events` boolean, required
        - `count_messages` boolean, required
        - `created_at` string, date-time, required
        - `custom_events` boolean, required
        - `delivery_events` boolean, required
        - `grants` object
        - `mark_messages_pending` boolean, required
        - `max_message_length` integer, required
        - `mutes` boolean, required
        - `name` string, required
        - `partition_size` integer
        - `partition_ttl` string, duration, nullable
        - `polls` boolean, required
        - `push_level` 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'
        - `push_notifications` boolean, required
        - `quotes` boolean, required
        - `reactions` boolean, required
        - `read_events` boolean, required
        - `reminders` boolean, required
        - `replies` boolean, required
        - `search` boolean, required
        - `shared_locations` boolean, required
        - `skip_last_msg_update_for_system_msgs` boolean, required
        - `typing_events` boolean, required
        - `updated_at` string, date-time, required
        - `uploads` boolean, required
        - `url_enrichment` boolean, required
        - `user_message_reminders` boolean, required
      - `cooldown` integer — Cooldown period after sending each message
      - `created_at` string, date-time, required — Date/time of creation
      - `created_by` UserResponse — User response object
        - `avg_response_time` integer
        - `ban_expires` string, date-time — Date when ban expires
        - `banned` boolean, required — Whether a user is banned or not
        - `blocked_user_ids` string[], required
        - `bypass_moderation` boolean
        - `created_at` string, date-time, required — Date/time of creation
        - `custom` object, required — Custom data for this object
        - `deactivated_at` string, date-time — Date of deactivation
        - `deleted_at` string, date-time — Date/time of deletion
        - `devices` DeviceResponse[] — List of devices user is using
          - `created_at` string, date-time, required — Date/time of creation
          - `disabled` boolean — Whether device is disabled or not
          - `disabled_reason` string — Reason explaining why device had been disabled
          - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers
          - `id` string, required — Device ID
          - `push_provider` string, required — Push provider
          - `push_provider_name` string — Push provider name
          - `user_id` string, required — User ID
          - `voip` boolean — When true the token is for Apple VoIP push notifications
        - `id` string, required — Unique user identifier
        - `image` string
        - `invisible` boolean, required
        - `language` string, required — Preferred language of a user
        - `last_active` string, date-time — Date of last activity
        - `name` string — Optional name of user
        - `online` boolean, required — Whether a user online or not
        - `privacy_settings` PrivacySettingsResponse
          - `delivery_receipts` DeliveryReceiptsResponse
            - `enabled` boolean
          - `read_receipts` ReadReceiptsResponse
            - `enabled` boolean
          - `typing_indicators` TypingIndicatorsResponse
            - `enabled` boolean
        - `push_notifications` PushNotificationSettingsResponse
          - `disabled` boolean
          - `disabled_until` string, date-time
        - `revoke_tokens_issued_before` string, date-time — Revocation date for tokens
        - `role` string, required — Determines the set of user permissions
        - `shadow_banned` boolean, required — Whether a user is shadow banned
        - `teams` string[], required — List of teams user is a part of
        - `teams_role` object
        - `updated_at` string, date-time, required — Date/time of the last update
      - `custom` object, required — Custom data for this object
      - `deleted_at` string, date-time — Date/time of deletion
      - `disabled` boolean, required
      - `filter_tags` string[] — List of filter tags associated with the channel
      - `frozen` boolean, required — Whether channel is frozen or not
      - `hidden` boolean — Whether this channel is hidden by current user or not
      - `hide_messages_before` string, date-time — Date since when the message history is accessible
      - `id` string, required — Channel unique ID
      - `last_message_at` string, date-time — Date of the last message sent
      - `member_count` integer — Number of members in the channel
      - `members` ChannelMemberResponse[] — List of channel members (max 100)
        - `archived_at` string, date-time
        - `ban_expires` string, date-time — Expiration date of the ban
        - `ban_from_future_channels` boolean — Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member)
        - `banned` boolean, required — Whether member is banned this channel or not
        - `channel_role` string, required — Role of the member in the channel
        - `created_at` string, date-time, required — Date/time of creation
        - `custom` object, required
        - `deleted_at` string, date-time
        - `deleted_messages` string[]
        - `future_channel_ban_expires` string, date-time — Expiration date of the future channel ban; absent when the future channel ban is permanent
        - `invite_accepted_at` string, date-time — Date when invite was accepted
        - `invite_rejected_at` string, date-time — Date when invite was rejected
        - `invited` boolean — Whether member was invited or not
        - `is_moderator` boolean — Whether member is channel moderator or not
        - `notifications_muted` boolean, required
        - `pinned_at` string, date-time
        - `role` string — Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner
        - `shadow_banned` boolean, required — Whether member is shadow banned in this channel or not
        - `status` string
        - `updated_at` string, date-time, required — Date/time of the last update
        - `user` UserResponse — User response object
          - `avg_response_time` integer
          - `ban_expires` string, date-time — Date when ban expires
          - `banned` boolean, required — Whether a user is banned or not
          - `blocked_user_ids` string[], required
          - `bypass_moderation` boolean
          - `created_at` string, date-time, required — Date/time of creation
          - `custom` object, required — Custom data for this object
          - `deactivated_at` string, date-time — Date of deactivation
          - `deleted_at` string, date-time — Date/time of deletion
          - `devices` DeviceResponse[] — List of devices user is using
            - `created_at` string, date-time, required — Date/time of creation
            - `disabled` boolean — Whether device is disabled or not
            - `disabled_reason` string — Reason explaining why device had been disabled
            - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers
            - `id` string, required — Device ID
            - `push_provider` string, required — Push provider
            - `push_provider_name` string — Push provider name
            - `user_id` string, required — User ID
            - `voip` boolean — When true the token is for Apple VoIP push notifications
          - `id` string, required — Unique user identifier
          - `image` string
          - `invisible` boolean, required
          - `language` string, required — Preferred language of a user
          - `last_active` string, date-time — Date of last activity
          - `name` string — Optional name of user
          - `online` boolean, required — Whether a user online or not
          - `privacy_settings` PrivacySettingsResponse
            - `delivery_receipts` DeliveryReceiptsResponse
              - …
            - `read_receipts` ReadReceiptsResponse
              - …
            - `typing_indicators` TypingIndicatorsResponse
              - …
          - `push_notifications` PushNotificationSettingsResponse
            - `disabled` boolean
            - `disabled_until` string, date-time
          - `revoke_tokens_issued_before` string, date-time — Revocation date for tokens
          - `role` string, required — Determines the set of user permissions
          - `shadow_banned` boolean, required — Whether a user is shadow banned
          - `teams` string[], required — List of teams user is a part of
          - `teams_role` object
          - `updated_at` string, date-time, required — Date/time of the last update
        - `user_id` string
      - `message_count` integer — Number of messages in the channel
      - `mute_expires_at` string, date-time — Date of mute expiration
      - `muted` boolean — Whether this channel is muted or not
      - `own_capabilities` ChannelOwnCapability[] — List of channel capabilities of authenticated user
      - `team` string — Team the channel belongs to (multi-tenant only)
      - `truncated_at` string, date-time — Date of the latest truncation of the channel
      - `truncated_by` UserResponse — User response object
        - `avg_response_time` integer
        - `ban_expires` string, date-time — Date when ban expires
        - `banned` boolean, required — Whether a user is banned or not
        - `blocked_user_ids` string[], required
        - `bypass_moderation` boolean
        - `created_at` string, date-time, required — Date/time of creation
        - `custom` object, required — Custom data for this object
        - `deactivated_at` string, date-time — Date of deactivation
        - `deleted_at` string, date-time — Date/time of deletion
        - `devices` DeviceResponse[] — List of devices user is using
          - `created_at` string, date-time, required — Date/time of creation
          - `disabled` boolean — Whether device is disabled or not
          - `disabled_reason` string — Reason explaining why device had been disabled
          - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers
          - `id` string, required — Device ID
          - `push_provider` string, required — Push provider
          - `push_provider_name` string — Push provider name
          - `user_id` string, required — User ID
          - `voip` boolean — When true the token is for Apple VoIP push notifications
        - `id` string, required — Unique user identifier
        - `image` string
        - `invisible` boolean, required
        - `language` string, required — Preferred language of a user
        - `last_active` string, date-time — Date of last activity
        - `name` string — Optional name of user
        - `online` boolean, required — Whether a user online or not
        - `privacy_settings` PrivacySettingsResponse
          - `delivery_receipts` DeliveryReceiptsResponse
            - `enabled` boolean
          - `read_receipts` ReadReceiptsResponse
            - `enabled` boolean
          - `typing_indicators` TypingIndicatorsResponse
            - `enabled` boolean
        - `push_notifications` PushNotificationSettingsResponse
          - `disabled` boolean
          - `disabled_until` string, date-time
        - `revoke_tokens_issued_before` string, date-time — Revocation date for tokens
        - `role` string, required — Determines the set of user permissions
        - `shadow_banned` boolean, required — Whether a user is shadow banned
        - `teams` string[], required — List of teams user is a part of
        - `teams_role` object
        - `updated_at` string, date-time, required — Date/time of the last update
      - `type` string, required — Type of the channel
      - `updated_at` string, date-time, required — Date/time of the last update
    - `created_at` string, date-time, required
    - `expires` string, date-time
    - `reason` string
    - `shadow` boolean
    - `user` UserResponse — User response object
      - `avg_response_time` integer
      - `ban_expires` string, date-time — Date when ban expires
      - `banned` boolean, required — Whether a user is banned or not
      - `blocked_user_ids` string[], required
      - `bypass_moderation` boolean
      - `created_at` string, date-time, required — Date/time of creation
      - `custom` object, required — Custom data for this object
      - `deactivated_at` string, date-time — Date of deactivation
      - `deleted_at` string, date-time — Date/time of deletion
      - `devices` DeviceResponse[] — List of devices user is using
        - `created_at` string, date-time, required — Date/time of creation
        - `disabled` boolean — Whether device is disabled or not
        - `disabled_reason` string — Reason explaining why device had been disabled
        - `hardware_id` string — Stable physical device identifier used to deduplicate pushes across push providers
        - `id` string, required — Device ID
        - `push_provider` string, required — Push provider
        - `push_provider_name` string — Push provider name
        - `user_id` string, required — User ID
        - `voip` boolean — When true the token is for Apple VoIP push notifications
      - `id` string, required — Unique user identifier
      - `image` string
      - `invisible` boolean, required
      - `language` string, required — Preferred language of a user
      - `last_active` string, date-time — Date of last activity
      - `name` string — Optional name of user
      - `online` boolean, required — Whether a user online or not
      - `privacy_settings` PrivacySettingsResponse
        - `delivery_receipts` DeliveryReceiptsResponse
          - `enabled` boolean
        - `read_receipts` ReadReceiptsResponse
          - `enabled` boolean
        - `typing_indicators` TypingIndicatorsResponse
          - `enabled` boolean
      - `push_notifications` PushNotificationSettingsResponse
        - `disabled` boolean
        - `disabled_until` string, date-time
      - `revoke_tokens_issued_before` string, date-time — Revocation date for tokens
      - `role` string, required — Determines the set of user permissions
      - `shadow_banned` boolean, required — Whether a user is shadow banned
      - `teams` string[], required — List of teams user is a part of
      - `teams_role` object
      - `updated_at` string, date-time, required — Date/time of the last update
  - `duration` string, required — Duration of the request in milliseconds

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/3dba86aaa0d8/schema)
