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:
| Parameter | Type | Required | Description |
|---|---|---|---|
groupId | String | Yes | The community channel ID. |
busChannel | String | No | The subchannel ID. If omitted, sets the community channel default. |
unpushLevel | Int | Yes | DND level:
|
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:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 200 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":200}