User

Update count preference of a channel

Changed on

Update count preference of a channel

This action updates a user's count preference of a specific group channel. The count preference allows a user to either update the number of unread messages or the number of unread mentioned messages, or both in a specific group channel.

If you want to retrieve the total number count of a specific group channel, go to the get count preference of a channel page.

https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/update-count-preference-of-a-channel#1-update-count-preference-of-a-channel

put/v3/users/{user_id}/count_preference/{channel_url}

Request

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

Path parameters

user_idstring required

(Required)

channel_urlstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

count_preference'false' | 'all' | 'unread_message_count_only' | 'unread_mentioned_count_only' required

Response

Successful response

count_preference'false' | 'all' | 'unread_message_count_only' | 'unread_mentioned_count_only'

Example response

{
  "count_preference": "false"
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • warning

      deleted the header request parameter Api-Token

    • warning

      added the new all enum value to the response property for the response status

    • warning

      added the new false enum value to the response property for the response status

    • warning

      added the new unread_mentioned_count_only enum value to the response property for the response status

    • warning

      added the new unread_message_count_only enum value to the response property for the response status

    • info

      api operation id updateCountPreferenceOfChannelByUrl removed and replaced with updateCountPreferenceOfAChannel

    • info

      added the new optional header request parameter api-token

    • info

      added the new all enum value to the request property

    • info

      added the new false enum value to the request property

    • info

      added the new unread_mentioned_count_only enum value to the request property

    • info

      added the new unread_message_count_only enum value to the request property

    • info

      the header request parameter Api-Token became optional