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

# Retry a failed run

> Runs a failed run again with the same input, as a new execution. Only failed runs can be retried. Needs `workflow:run`.



## OpenAPI

````yaml POST /api/workflows/{id}/executions/{execId}/retry
openapi: 3.1.0
info:
  title: HITL API
  version: 1.0.0
  description: >-
    Run the workflows you build in HITL, follow each run until a person has
    answered, and manage who reviews them.
servers:
  - url: https://api.hitl.sh/v1
security:
  - bearerAuth: []
tags:
  - name: Workflows
  - name: Runs
  - name: Reviewers
  - name: Webhooks
  - name: Account
  - name: Uploads
paths:
  /api/workflows/{id}/executions/{execId}/retry:
    post:
      tags:
        - Runs
      summary: Retry a failed run
      description: >-
        Runs a failed run again with the same input, as a new execution. Only
        failed runs can be retried. Needs `workflow:run`.
      operationId: runs-retry
      parameters:
        - name: id
          in: path
          required: true
          description: The workflow id
          schema:
            type: string
            example: 6af2ce4e8207961501f59472
        - name: execId
          in: path
          required: true
          description: The failed execution
          schema:
            type: string
            example: 6af2cf01c6a9f1dc71efd5e6
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
              example:
                error: false
                msg: Retry started
                data:
                  execution_id: 6af2dc21c6a9f1dc71efd5f2
                  workflow_id: 6af2ce4e8207961501f59472
        '400':
          $ref: '#/components/responses/E400'
        '401':
          $ref: '#/components/responses/E401'
        '404':
          $ref: '#/components/responses/E404'
components:
  responses:
    E400:
      description: Invalid input; `msg` says what to fix
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: true
            msg: Invalid execution id
    E401:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: true
            msg: Invalid API key
    E404:
      description: Not found, or not yours
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: true
            msg: Workflow not found
  schemas:
    Error:
      type: object
      required:
        - error
        - msg
      properties:
        error:
          type: boolean
          example: true
        msg:
          type: string
          description: What went wrong, in plain words
        code:
          type: string
          description: >-
            A machine-readable reason, when there is one (for example
            `confirmation_required`)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `hitl_live_…`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.