curl --request DELETE \
--url https://qstash.upstash.io/v2/workflows/dlq \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash.upstash.io/v2/workflows/dlq"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash.upstash.io/v2/workflows/dlq', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qstash.upstash.io/v2/workflows/dlq",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qstash.upstash.io/v2/workflows/dlq"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://qstash.upstash.io/v2/workflows/dlq")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash.upstash.io/v2/workflows/dlq")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": 123,
"cursor": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Bulk Delete Failed Workflow Runs
Delete multiple failed workflow runs from the DLQ.
When a workflow run fails, it is moved to the DLQ. You can manually remove a failed workflow run from the DLQ using this endpoint. This is useful for cleaning up failed runs that you no longer wish to retry or analyze.
You can either specify specific DLQ IDs to delete, or use filters to delete matching workflows. When using filters without DLQ IDs, the operation supports pagination via cursor.
curl --request DELETE \
--url https://qstash.upstash.io/v2/workflows/dlq \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash.upstash.io/v2/workflows/dlq"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash.upstash.io/v2/workflows/dlq', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qstash.upstash.io/v2/workflows/dlq",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qstash.upstash.io/v2/workflows/dlq"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://qstash.upstash.io/v2/workflows/dlq")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash.upstash.io/v2/workflows/dlq")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": 123,
"cursor": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
QStash authentication token
Query Parameters
List of specific DLQ IDs to delete. If provided, other filters are ignored.
Pagination cursor for deleting in batches.
Maximum number of workflows to delete per request.
Filter by starting date in milliseconds (Unix timestamp). This is inclusive.
Filter by ending date in milliseconds (Unix timestamp). This is inclusive.
Filter by workflow URL.
Filter by workflow run ID.
Filter by workflow creation timestamp in milliseconds (Unix timestamp).
Filter by label assigned to the workflow run.
Filter by failure function state.
| State | Description |
|---|---|
| CALLBACK_INPROGRESS | The failure function is in progress. |
| CALLBACK_SUCCESS | The failure function run successfully. |
| CALLBACK_FAIL | The failure function failed to run. |
| CALLBACK_CANCELED | The failure function was manually canceled |
Filter by IP address of the publisher.
Filter by Flow Control Key.
Was this page helpful?