Sample - Slack Web API
POST/chat.deleteScheduledMessage

Delete a scheduled message

Deletes a pending scheduled message from the message queue. Supply channel and the scheduled_message_id returned by chat.scheduleMessage to identify the queued message. Use as_user when the deletion must be performed as the authenticated user rather than with bot scope.

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

1 parameter · 3 body fields
tokenstringrequired
Authentication token with the `chat:write` scope.

The scheduled message identification and deletion-identity options.

as_userbooleanoptional
Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.
channelstringrequired
The channel the scheduled_message is posting to
scheduled_message_idstringrequired
`scheduled_message_id` returned from call to chat.scheduleMessage

2 status codes
200Returns a success response containing `ok: true`.
okbooleanrequired
Allowed:true
defaultReturns `ok: false` with an error when the scheduled message or channel cannot be found, authentication or permission checks fail, or an argument is invalid.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:invalid_scheduled_message_idchannel_not_foundbad_tokennot_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_requiredekm_access_deniedmissing_scopeinvalid_arguments
okbooleanrequired
Allowed:false

Error handling

channel and scheduled_message_id are required. Use the scheduled message identifier returned by chat.scheduleMessage, and provide as_user only when the token has the chat:write:user scope.