Bulk Cancel Messages
Stop delivery of multiple messages at once
Bulk cancel allows you to cancel multiple messages at once.
Cancelling a message will remove it from QStash and stop it from being delivered in the future. If a message is in flight to your API, it might be too late to cancel.
If you provide a set of message IDs in the body of the request, only those messages will be cancelled. If no body is sent, QStash will cancel all of your messages.
This operation scans all your messages and attempts to cancel them. If an individual message cannot be cancelled, it will not continue and will return an error message. Therefore, some messages may not be cancelled at the end. In such cases, you can run the bulk cancel operation multiple times.
Request
The list of message IDs to cancel
Response
A cancelled object with the number of cancelled messages.
Was this page helpful?