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

    Mark all messages as delivered

    Copy link

    Marks all messages in a group channel as delivered for a specific user. This action is only applicable for users in a group channel.


    HTTP request

    Copy link
    PUT https://api-{application_id}.sendbird.com/v3/group_channels/{channel_url}/messages/mark_as_delivered
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_url

    string

    Specifies the URL of the target channel.


    Request body

    Copy link

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

    Required
    Property nameTypeDescription

    user_id

    string

    Specifies the ID of the recipient to mark messages as delivered.

    {
        "user_id": "debbie"
    }
    

    Response

    Copy link

    If delivered_ts, which indicates the delivery timestamp of the latest message, of the user is updated, the key ts indicating the updated value of the user's delivered_ts is included in the response in Unix milliseconds format.

    {
        "ts": 1542756099266
    }
    

    Any GET API call that returns a group channel resource contains the delivery_receipt property inside the resource. A user who has never made a delivery event isn't included in the property. The property consists of the user ID and the timestamp of when the user last received the message in Unix milliseconds as shown below.

    {
        "channels": [
            {
                ...
    
                "delivery_receipt": {
                    "benjamin": 1542756099266,
                    "charles": 1542756098734,
                    "debbie": 1542756099266
                },
                ...
    
            },
            ...
    
        ],
        "next": "ansYQFFRQ1AIEUBXX1RcE2d0FUZSUlkJFVQRHB86AkAgNn8eABABBBNFX..."
    }
    

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