Skip to main content

Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Set default do not disturb

Set the default do not disturb (DND) logic for a specified community channel or subchannel. The default DND setting applies to all members and is typically configured by the community channel administrator.

tip
  • When determining whether to push a community channel message, the default DND configuration for a community channel or subchannel has lower priority than any user-level DND setting.
  • User-level DND settings support controlling DND for specific direct channels, group channels, community channels, and subchannels, as well as setting a global DND time period. User-level priority: Global DND > Subchannel DND > Channel DND > Channel type DND. See Do not disturb overview.
  • A default DND setting for a community channel automatically applies to all its subchannels. If a subchannel has its own default DND setting, the subchannel's setting takes precedence.

Request method

POST: https://Base URL/ultragroup/notdisturb/set.json

Rate limit: 100 requests per second

Signature required: All server API requests require signature verification. See API request signature.

Request body

The request body is in application/x-www-form-urlencoded format and supports the following form parameters:

ParameterTypeRequiredDescription
groupIdStringYesThe community channel ID.
busChannelStringNoThe subchannel ID. If omitted, sets the community channel default.
unpushLevelIntYesDND level:
  • -1: Notify for all messages
  • 0: Not set (default state — notifies for all messages; if a community channel default is set, that default applies)
  • 1: Notify only for @ messages (both @specific user and @all)
  • 2: Notify only for @specific user messages (only the mentioned user receives notifications; @all does not trigger notifications)
  • 4: Notify only for @all messages
  • 5: No notifications, even for @ messages

Request example

HTTP
POST /ultragroup/notdisturb/set.json HTTP/1.1
Host: api.sg-light-api.com
App-Key: c9kqb3rdkbb8j
NONCE: 97
TIMESTAMP: 1480479442
SIGNATURE: 9774e3d91656dc92df8aff294d46d6a506412538
Content-Type: application/x-www-form-urlencoded

groupId=abcdefg&unpushLevel=2

Response

The response body contains a JSON object with the following structure:

FieldTypeDescription
codeNumberStatus code. 200 indicates success.

Response example

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

{"code":200}