product:chat

Restricts user activity either in specific channel or globally

Sends events:

  • user.banned
  • user.messages.deleted
post/moderation/ban

Request

  • Base URL
    https://chat.stream-io-api.com
  • URL
    https://chat.stream-io-api.com/moderation/ban
  • Auth
    • API key in header Authorization and API key in query parameter api_key and API key in header Stream-Auth-Type
    • or API key in query parameter api_key and API key in header Stream-Auth-Type

Request body

ban_from_future_channelsboolean

Whether to also ban the user from all future channels created by the banner

banned_by_idstring

User ID who issued a ban

channel_cidstring

Channel CID to ban user in eg. messaging:123

delete_messages'soft' | 'pruning' | 'hard'
delete_reactionsboolean

Whether to delete reactions by the banned user on other users' messages

ip_banboolean

Whether to perform IP ban or not

reasonstring

Ban reason

shadowboolean

Whether to perform shadow ban or not

target_user_idstring required

ID of user to ban

timeoutinteger

Timeout of ban in minutes. User will be unbanned after this period of time

user_idstring

Response

Response

durationstring required

Duration of the request in milliseconds

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the request property /// became optional

    • info

      the request property /// became optional

    • info

      the request property /// became optional

    • info

      the request property /// became optional

    • info

      the request property /// became optional

    • info

      the request property /// became optional