Mark Messages as Read/Unread

Last Updated on : 2022-01-24 10:16:44

Mark the messages under a specified recipient ID as read or unread.

API address

PUT: /v1.0/sdf/notifications/messages/actions-read

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
read_flagString trueSpecifies whether a message is read. Valid values:
  • 0: It is unread.
  • 1: It is already read.
recipient_idString trueThe ID of a specified recipient.
message_idsString trueThe list of message IDs, separated by a comma (,). Valid values: 0 to 200.

Return parameter

Parameter nameTypeDescription
resultBooleanSpecifies whether the operation is successful. Valid values:
  • true: success.
  • false: failure.

Request example

PUT: /v1.0/sdf/notifications/messages/acitons-read
{
  "recipient_id": "bay1636698039708****",
  "message_ids": "659937****,659947****",
  "read_flag": 0
}

Return example

{
    "result": true,
    "t": 1637563727813,
    "success": true
}

Error code

For more information, see error code.