/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Mark all of a user's messages as read

    Copy link

    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

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

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    NameTypeDescription

    user_id

    string

    Specifies the unique ID of a user.


    Request body

    Copy link

    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

    Copy link

    If successful, this action returns an empty response body.

    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
    }