Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API
    /
    User

    Update count preference of a channel

    Updates a user's count preference of a specific group channel.


    HTTP request

    PUT https://api-{application_id}.sendbird.com/v3/users/{user_id}/count_preference/{channel_url}
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    user_id

    string

    Specifies the unique ID of a user.

    channel_url

    string

    Specifies the URL of a group channel.


    Request body

    The following table lists the properties of an HTTP request that this action supports.

    Required
    Property nameTypeDescription

    count_preference

    string

    Determines whether to only count the number of unread messages or unread mentioned messages in the specified group channel. Only the preferred unread item is counted and added to the total number count. Acceptable values are the following:
    - off: Determines that neither of unread statuses are counted.
    - all: Determines that both unread statuses are counted.
    - unread_message_count_only: Determines that only the user's unread messages are counted.
    - unread_mentioned_count_only: Determines that only the user's unread mentioned messages are counted. (Default: all)


    Response

    If successful, this action returns the user's count preference of the group channel in the response body.

    In the case of an error, an error object is returned. A detailed list of error codes is available here.