# Source: https://upstash.com/docs/workflow/rest/dlq/restart.md

# Source: https://upstash.com/docs/workflow/features/dlq/restart.md

# Source: https://upstash.com/docs/workflow/basics/client/dlq/restart.md

> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# client.dlq.restart

The `dlq.restart` method restarts one or more workflow runs from **Dead Letter Queue (DLQ)**.
This allows you to reprocess workflow runs that previously failed after exhausting retries.

## Arguments

<ParamField body="dlqId" type="string|string[]" required>
  The DLQ entry ID or list of IDs to restart.
  Use the `dlqId` field from messages returned by `client.dlq.list()`.
</ParamField>

<ParamField body="flowControl" type="object" optional>
  An optional flow control configuration to limit concurrency and execution rate of restarted workflow runs.

  See [Flow Control](/workflow/features/flow-control) for details.

  <Expandable title="properties">
    <ParamField body="key" type="string">
      A logical grouping key that identifies which requests share the same flow control limits.
    </ParamField>

    <ParamField body="rate" type="number">
      The maximum number of allowed requests per second.
    </ParamField>

    <ParamField body="parallelism" type="number">
      The maximum number of concurrent requests allowed.
    </ParamField>

    <ParamField body="period" type="string|number">
      The time window used to enforce the defined rate limit. Default is `1s`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="retries" type="number" optional>
  Number of retry attempts to apply to the restarted workflow invocation.
  Defaults to `3` if not provided.
</ParamField>

## Response

`client.dlq.restart()` returns one or more objects containing details of the restarted workflow run(s):

<ResponseField name="workflowRuns" type="object[]">
  <Expandable defaultOpen>
    <ResponseField name="workflowRunId" type="string">
      The ID of the new workflow run created from the restarted DLQ message.
    </ResponseField>

    <ResponseField name="workflowCreatedAt" type="number">
      The Unix timestamp (in milliseconds) when the new workflow run was created.
    </ResponseField>
  </Expandable>
</ResponseField>

## Usage

<CodeGroup>
  ```ts Single theme={"system"}
  const { messages } = await client.dlq.list();

  const response = await client.dlq.restart({
    dlqId: messages[0].dlqId, // Use the dlqId from the message
    flowControl: {
      key: "my-flow-control-key",
      parallelism: 10,
    },
    retries: 3,
  });

  ```

  ```ts Multiple theme={"system"}
  const responses = await client.dlq.restart({
    dlqId: ["dlq-12345", "dlq-67890"],
    retries: 5,
  });
  ```
</CodeGroup>