> ## 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.

# Restart Workflow from DLQ

> 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.




## OpenAPI

````yaml /workflow/openapi.yaml post /v2/workflows/dlq/restart/{dlqId}
openapi: 3.1.0
info:
  title: Upstash Workflow REST API
  description: >
    Upstash Workflow is a serverless workflow orchestration service built on top
    of Upstash QStash and Upstash Redis.
  version: 2.0.0
  contact:
    name: Upstash
    url: https://upstash.com
servers:
  - url: https://qstash.upstash.io
security:
  - bearerAuth: []
  - bearerAuthQuery: []
paths:
  /v2/workflows/dlq/restart/{dlqId}:
    post:
      tags:
        - DLQ
      summary: Restart Workflow from DLQ
      description: >
        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:
        - in: path
          name: dlqId
          required: true
          schema:
            type: string
          description: The DLQ ID of the workflow run to restart.
        - in: header
          name: Upstash-Retries
          required: false
          schema:
            type: integer
          description: Override the number of retries for the workflow steps.
        - in: header
          name: Upstash-Delay
          required: false
          schema:
            type: string
          description: >-
            Override the delay before executing the workflow. Format is
            `<value><unit>` (e.g., "10s", "5m").
        - in: header
          name: Upstash-Retry-Delay
          required: false
          schema:
            type: string
          description: Override the retry delay expression for the workflow steps.
        - in: header
          name: Upstash-Flow-Control-Key
          required: false
          schema:
            type: string
          description: Override the flow control key for the workflow.
        - in: header
          name: Upstash-Flow-Control-Value
          required: false
          schema:
            type: string
          description: >-
            Override the flow control configuration in the format
            `parallelism=<value>, rate=<value>, period=<value>`.
        - in: header
          name: Upstash-Label
          required: false
          schema:
            type: string
          description: Override the label for the workflow.
        - in: header
          name: Upstash-Failure-Callback
          required: false
          schema:
            type: string
          description: Override the failure callback URL for the workflow.
      responses:
        '200':
          description: Workflow restarted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  workflowRunId:
                    type: string
                    description: >-
                      The ID of the restarted workflow run (a new ID is
                      generated for the restarted run).
                  workflowCreatedAt:
                    type: integer
                    format: int64
                    description: >-
                      The timestamp when the restarted workflow run was created
                      (Unix timestamp in milliseconds).
        '400':
          description: >-
            Bad Request - Invalid DLQ ID, not a workflow message, or workflow
            doesn't support restart
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: DLQ message not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: QStash authentication token
    bearerAuthQuery:
      type: apiKey
      in: query
      name: qstash_token
      description: QStash authentication token passed as a query parameter

````