Skip to main content

Overview

When Mute Notifications is enabled for a conversation, offline push notifications are not sent for that conversation. After this API is called, the IM Server automatically synchronizes undisturb_type across the specified user's clients.

Request

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

Method: POST

Rate limit: 100 requests/second

Endpoint: https://API domain/apigateway/convers/undisturb

Content-Type: application/json

Request Parameters

ParameterData TypeRequiredDescription
user_idstringYesID of the user whose Mute Notifications settings are being changed. Maximum length: 32 characters.
itemsarrayYesConversations whose Mute Notifications settings are being changed.
items[].target_idstringYesConversation target ID. Maximum length: 32 characters.
items[].channel_typeintYesConversation type.
items[].undisturb_typeintYesMute Notifications setting. 0: disable; 1: enable for a regular conversation.

Request Example

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

{
"user_id":"userid1",
"items":[
{
"target_id":"userid2",
"channel_type":1,
"undisturb_type":1
},
{
"target_id":"groupid1",
"channel_type":2,
"undisturb_type":1
}
]
}

Response Example

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