# Restart Workflow from DLQ

> Restart a failed workflow run from the DLQ. The workflow will start from the beginning.

## Endpoint

`POST https://qstash-{region}.upstash.io/v2/workflows/dlq/restart/{dlqId}`

Restart a failed workflow run from the DLQ. The workflow will start from the beginning.

Unlike resume, which continues from where the workflow failed, restart executes the entire workflow
from the first step. A new workflow run ID is generated and all steps will be executed again.


## Parameters

- `dlqId` (path, string, required): The DLQ ID of the workflow run to restart.
- `Upstash-Retries` (header, integer): Override the number of retries for the workflow steps.
- `Upstash-Delay` (header, string): Override the delay before executing the workflow. Format is `<value><unit>` (e.g., "10s", "5m").
- `Upstash-Retry-Delay` (header, string): Override the retry delay expression for the workflow steps.
- `Upstash-Flow-Control-Key` (header, string): Override the flow control key for the workflow.
- `Upstash-Flow-Control-Value` (header, string): Override the flow control configuration in the format `parallelism=<value>, rate=<value>, period=<value>`.
- `Upstash-Label` (header, string): Override the label(s) for the workflow.

You can assign multiple labels by providing a comma-separated list.

Example: `label_1,label_2`

- `Upstash-Failure-Callback` (header, string): Override the failure callback URL for the workflow.

## Responses

### 200 - Workflow restarted successfully

- `workflowRunId` (string): The ID of the restarted workflow run (a new ID is generated for the restarted run).
- `workflowCreatedAt` (integer): The timestamp when the restarted workflow run was created (Unix timestamp in milliseconds).

### 400 - Bad Request - Invalid DLQ ID, not a workflow message, or workflow doesn't support restart

- `error` (string, required): Error message

### 401 - Unauthorized

- `error` (string, required): Error message

### 404 - DLQ message not found

- `error` (string, required): Error message

### 500 - Internal Server Error

- `error` (string, required): Error message

## cURL

```bash
curl --request POST \
  --url https://qstash-{region}.upstash.io/v2/workflows/dlq/restart/{dlqId} \
  --header 'Authorization: Bearer <token>'
```
