Skip to main content

Overview

Marks specified messages as read.

Request

Authentication: Add authentication headers to the request. See Authentication.

Method POST

Rate limit 100 requests/second

Endpoint https://API domain/apigateway/messages/markread

Content-Type application/json

Request Parameters

ParameterData TypeRequiredDescription
user_idstringYesID of the user marking the messages as read. Maximum length: 32 characters.
target_idstringYesConversation target ID. For a private chat, this is the message sender ID; for a group chat, this is the group ID. Maximum length: 32 characters.
channel_typeintYesConversation type. 1: private chat; 2: group chat.
msg_idsarrayYesIDs of the messages to mark as read. Each message ID can contain up to 20 characters.

Request Example

POST /apigateway/messages/markread HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json

{
"user_id":"userid1",
"target_id":"userid2",
"channel_type":1,
"msg_ids":["xxxxxxx","yyyyyyy"]
}

Response Example

{
"code":0,
"msg":"sucess"
}