Skip to main content

Get DND for a channel

Query the Do Not Disturb (DND) notification level that a user has set for a specific channel.

tip

This is a user-level setting. See Set DND for a channel for the corresponding set API.

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/channel/notification/get

Rate limit: 100 requests per second

Authentication: All server API requests require signature verification. See API request signing.

Request body

Content type: application/json

ParameterTypeRequiredDescription
channelTypeStringYesChannel type. 1: direct. 3: group. 6: system. 10: community.
requestIdStringYesUser ID.
channelIdStringYesTarget channel ID.
subchannelIdStringNoCommunity subchannel ID. If omitted for community channels, returns the DND level for messages not belonging to any subchannel.

Request example

HTTP
POST /v4/channel/notification/get HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"channelType": 1,
"requestId": "b5NwvIrW8",
"channelId": "2MqOJa1Un"
}

Response

PropertyTypeDescription
codeNumberStatus code. 0 indicates success.
resultObjectResponse data.
result.muteStatusNumberNotification level: -1 (all), 0 (not set), 1 (@ messages only), 2 (specific @ only), 4 (@all only), 5 (none).

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"code": 0,
"result": {
"muteStatus": 0
}
}