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

    Overview

    Copy link

    The delivery receipts feature indicates whether a message has successfully been delivered to all the intended recipients by Sendbird server. With delivery receipts, Sendbird not only provides the timestamp of when each user has last read the messages in each channel, but also the timestamp of when each user has last delivered the message to each user in each channel.

    Note: This feature is only applicable to group channels.


    Benefits

    Copy link

    Delivery receipts provide the following benefits.

    Highly in demand feature

    Copy link

    Most popular messaging apps, such as WhatsApp and Facebook Messenger, provide this feature. Users who have experienced them expect to see if the message they sent has been successfully delivered when using a new chat service. As a feature that many are accustomed to having, delivery receipts are in high demand by today's users.

    Improved user experience

    Copy link

    Previously, a sender had no way of knowing whether their message was unread because the server is in the process of delivering or failed to deliver the message due to unreliable internet connection, or simply because the recipients haven't yet read the message. This feature enables users to become better informed, thus improving the Sendbird user experience.


    How it works

    Copy link

    The delivery receipts feature works in a similar way to the read receipts feature. The server stores the timestamp of the message last delivered as delivered_ts. The timestamp is recorded per user, per channel.

    API endpoint

    Copy link

    The Chat API provides the mark all messages as delivered action to receive a delivery event from the recipient client. This method updates the database with delivered_ts which indicates the delivery timestamp of the last message, if your Sendbird application has the delivery receipts feature enabled.

    Delivery event

    Copy link

    If any of the following actions is called, they are all considered a delivery event to Sendbird server.

    ActionHTTP request

    Mark all messages as delivered in a group channel

    PUT /group_channels/{channel_url}/messages/mark_as_delivered
    Marks all messages in a group channel as delivered for a specific user.

    Mark all messages as read in a group channel

    PUT /group_channels/{channel_url}/messages/mark_as_read
    Marks all messages in a group channel as read for a specific user.

    Mark all messages as read in all the joined group channels

    PUT /users/{user_id}/mark_as_read_all
    Marks all of a user's unread messages as read in group channels.

    When the server receives a delivery event from a user, it updates the database with the user's delivery receipt and stores the current server time as delivered_ts to the database.

    Note: The Chat API's send a message to a group channel action is also considered a delivery event for Sendbird server when it is called to send a message to a group channel.


    Actions

    Copy link

    The following table shows a list of actions supported for delivery receipts. API endpoints are relative to the base URL allocated to your Sendbird application. In this page, the /group_channels/{channel_url}/messages endpoint refers to https://api-{application_id}.sendbird.com/v3/group_channels/{channel_url}/messages.

    Note: If you want to know the ID and base URL of your application, sign in to the Sendbird Dashboard, go to the Settings > Application > General, and then check the Application ID and API request URL.

    • It's recommended that the parameter values in API URLs be urlencoded, such as {user_id} and {channel_url}.

    List of actions

    Copy link
    ActionHTTP request

    Mark all messages as delivered

    PUT /group_channels/{channel_url}/messages/mark_as_delivered
    Marks all messages in a group channel as delivered for a specific user.