Resume Workflow from DLQ
curl --request POST \
--url https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}', 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-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}"
req, _ := http.NewRequest("POST", 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.post("https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflowRunId": "<string>",
"workflowCreatedAt": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}DLQ
Resume Workflow from DLQ
POST
/
v2
/
workflows
/
dlq
/
resume
/
{dlqId}
Resume Workflow from DLQ
curl --request POST \
--url https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}', 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-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}"
req, _ := http.NewRequest("POST", 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.post("https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash-{region}.upstash.io/v2/workflows/dlq/resume/{dlqId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflowRunId": "<string>",
"workflowCreatedAt": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}When a workflow run fails, it’s automatically moved to the DLQ (Dead Letter Queue) where it can be analyzed and resumed.
The resume feature allows you to continue a failed workflow run from exactly where it failed, without re-executing successfully completed steps.
This is particularly useful for long-running workflows where you don’t want to lose progress from successful steps when a single step fails.
When a workflow is resumed, it continues execution from the last failed step. A new workflow run ID is generated,
but the workflow maintains the state and results from previously completed steps.
You can make changes to the workflow code as long as these changes come after the failed steps.
However, making changes before the failed step will break the code and is not allowed.For more details, check out Handle workflow route code changes page.
Authorizations
bearerAuthbearerAuthQuery
QStash authentication token
Headers
Override the number of retries for the remaining workflow steps.
Override the delay before executing the next workflow step. Format is <value><unit> (e.g., "10s", "5m").
Override the retry delay expression for the remaining workflow steps.
Override the flow control key for the remaining workflow steps.
Override the flow control configuration in the format parallelism=<value>, rate=<value>, period=<value>.
Override the label(s) for the remaining workflow steps.
You can assign multiple labels by providing a comma-separated list.
Example: label_1,label_2
Override the failure callback URL for the remaining workflow steps.
Path Parameters
The DLQ ID of the workflow run to resume.
Was this page helpful?