Skip to main content

Set DND by channel type

Set the Do Not Disturb (DND) notification level for a specific channel type for a given user. Supports direct, group, community, and system channels. The SDK receives the updated DND status in real time.

tip
  • This is a user-level setting. Channel-type DND has lower priority than channel-specific DND. See Set DND for a channel.
  • For community channels, default DND at the community/subchannel level (non-user-level) has even lower priority. See Set community channel DND.

Request

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

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 to configure DND for.
notificationLevelNumberYesNotification level:
  • -1: notify for all messages
  • 0: not set (inherits from group/app-level default)
  • 1: notify only for @ messages
  • 2: notify only when specifically @-mentioned (not @all)
  • 4: notify only for @all mentions
  • 5: no notifications

Request example

HTTP
POST /v4/channel-type/notification/set 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",
"notificationLevel": 2
}

Response

PropertyTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

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

{"code":0}