Group channel

Hide a channel

This action allows you to hide a group channel from a user's channel list. Hiding a channel gives users the ability to archive channels so that they can focus on channels that need the most attention.

With this API, you can allow users to hide a channel from themselves or from all channel members. You can also determine whether to have the channel remain hidden when a new message is sent to the channel. Note that only group channels can be hidden.

https://sendbird.com/docs/chat/platform-api/v3/channel/managing-a-channel/hide-a-channel#1-hide-a-channel

put/v3/group_channels/{channel_url}/hide

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

channel_urlstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

allow_auto_unhideboolean

Determines the state and operating behavior of the channel in a channel list. If set to true, the channel is hidden from a user's channel list but it will reappear when there is a new message. If set to false, the channel is hidden from a user's channel list and it will remain hidden unless the value of the property changes to true through unarchiving. (Default: true)<br /><br /> When a user who has hidden the channel sends a message in that channel through the Platform API, the allow_auto_unhide property is changed to true, making the channel reappear in the channel list.

hide_previous_messagesboolean

When the channel gets appeared back in either the list of the user in the user_id property or the lists of all channel members (should_hide_all = true), determines whether to conceal the messages sent and received before hiding or archiving the channel. (Default: false)<br /><br /> This property is effective only when the value of the global application settings resource's display_past_message property is false.

should_hide_allboolean

Determines whether to make the specified channel disappear from the channel list of all channel members. When this is set to true, the user_id property isn't effective and doesn't need to be specified in the request. (Default: false)

user_idstring required

Specifies the unique ID of the user whose channel will be hidden or archived from the list. This property is required when should_hide_all is set to false, which is the default value. However, when should_hide_all is set to true, this property isn't effective.

Response

Successful response

EmptyObjectResponse required

Changes

    • warning

      deleted the header request parameter Api-Token

    • warning

      removed the request property

    • warning

      removed the optional property anyOf from the response with the status

    • info

      api operation id gcHideOrArchiveChannel removed and replaced with hideAChannel

    • info

      added the new optional header request parameter api-token

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      the header request parameter Api-Token became optional