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

    Mark all of a user's messages as read

    This action marks all of a user's unread messages as read in certain group channels. If channels aren't specified, the user's unread messages in all group channels are marked as read.


    HTTP request

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

    Parameters

    The following table lists the parameters that this action supports.

    Required
    NameTypeDescription

    user_id

    string

    Specifies the unique ID of a user.


    Request body

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

    Optional
    NameTypeDescription

    channel_urls[]

    array of strings

    Specifies an array of one or more group channel URLs where unread messages need to be marked as read. If not specified, unread messages in all group channels a user joined are marked as read.

    {
        "channel_urls": ["sendbird_group_channel_24896175_a72c41bacda9d4559f60379b4547f7c6d15d74fe", "sendbird_group_channel_24896175_1062a6074f982c05f9c49c6111ccae49eba096b3"]
    }
    

    Responses

    If successful, this action returns an empty response body.

    Error

    In the case of an error, an error object like below is returned. See the error codes section for more details.

    {
        "message": "\"User\" not found.",
        "code": 400201,
        "error": true
    }