POST
/
v2
/
workflows
/
dlq
/
restart
curl -X POST https://qstash.upstash.io/v2/workflows/dlq/restart \
  -H "Authorization: Bearer <token>" \
  -H "Upstash-Flow-Control-Key: custom-key" \
  -H "Upstash-Flow-Control-Value: parallelism=1" \
  -H "Upstash-Retries: 3" \
{
  "cursor": "",
  "workflowRuns": [
    {
      "workflowRunId": "wfr_resumed_A",
      "workflowCreatedAt": 1748527971000
    },
    {
      "workflowRunId": "wfr_resumed_B",
      "workflowCreatedAt": 1748527971000
    }
  ]
}

The bulk restart feature allows you to restart multiple failed workflow runs from the Dead Letter Queue (DLQ), using their original payloads and configurations.

You can specify individual DLQ IDs or apply filters to identify the workflow runs you want to restart.

A maximum of 50 workflow runs can be restarted per request. If more runs are available, a cursor is returned, which can be used in subsequent requests to continue the operation. When no cursor is returned, all entries have been processed.

Each restarted workflow run is assigned a new random Run ID.

Request Parameters

dlqIds
array

A list of DLQ IDs corresponding to the failed workflow runs you want to restart.

fromDate
integer

Optional. Restart workflow runs that failed on or after this unix millisecond timestamp.

toDate
integer

Optional. Restart workflow runs that failed on or before this unix millisecond timestamp.

workflowUrl
string

Optional. Restart workflow runs where the workflow URL matches this value.

workflowRunId
string

Optional. Restart workflow runs matching this specific Run ID or ID prefix.

workflowCreatedAt
integer

Optional. Restart workflow runs created at the specified unix millisecond timestamp.

Upstash-Flow-Control-Key
string

Optional. Override the flow control key for the restarted workflows. If not provided, the original key is reused.

Upstash-Flow-Control-Value
string

Optional. Override the flow control value for the restarted workflows. If not provided, the original value is reused.

Upstash-Retries
integer

Optional. Override the retry configuration for the steps in the restarted workflows.

Response

cursor
string

A cursor to paginate through additional matching DLQ entries. If not present, there are no more entries to process.

workflowRuns
array

A list of resumed workflow runs, each containing a new run ID and creation timestamp.

Request Example

curl -X POST https://qstash.upstash.io/v2/workflows/dlq/restart \
  -H "Authorization: Bearer <token>" \
  -H "Upstash-Flow-Control-Key: custom-key" \
  -H "Upstash-Flow-Control-Value: parallelism=1" \
  -H "Upstash-Retries: 3" \
{
  "cursor": "",
  "workflowRuns": [
    {
      "workflowRunId": "wfr_resumed_A",
      "workflowCreatedAt": 1748527971000
    },
    {
      "workflowRunId": "wfr_resumed_B",
      "workflowCreatedAt": 1748527971000
    }
  ]
}