Sample - Slack Web API
POST/dnd.setSnooze

Set Do Not Disturb snooze

Enables Do Not Disturb snooze mode for the authenticated user or changes its duration. Supply token and num_minutes to define how long the snooze should remain active.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 body fields

Snooze configuration containing authentication credentials and the duration to apply.

tokenstringrequired
Authentication token. Requires scope: `dnd:write`
num_minutesstringrequired
Number of minutes, from now, to snooze until.

2 status codes
200Returns `ok: true`, confirms that snooze is enabled, and provides the snooze end time and remaining duration.
okbooleanrequired
Allowed:true
snooze_enabledbooleanrequired
snooze_endtimeintegerrequired
snooze_remainingintegerrequired
defaultReturned when the duration is missing or snooze cannot be enabled, or when authentication, permissions, account status, or request encoding is invalid.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:missing_durationsnooze_failednot_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_requireduser_is_botinvalid_arg_nameinvalid_array_arginvalid_charset
okbooleanrequired
Allowed:false

Error handling

token and num_minutes must both be supplied. Use num_minutes to specify the snooze duration from the current time, and provide a token with the dnd:write scope.