> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/workflow/api-reference/runs/retry-a-step-now&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Retry a Step Now

> Execute a workflow step that is waiting for its next retry immediately

`POST /v2/messages/{messageId}/retry`

When a step fails, Upstash Workflow schedules the next attempt according to the configured retry delay. This endpoint skips the remaining wait and executes the step right away, so the workflow run can continue without waiting.

Retrying now does not add an extra attempt. It moves the already scheduled retry forward, so the retry count and the remaining retries stay the same.

The `messageId` of a retrying step is available in the step details returned by the [logs](/workflow/api-reference/logs/list-workflow-run-logs) endpoint. Steps waiting for a retry have a `nextDeliveryTime`. If multiple parallel steps are waiting for a retry, call this endpoint once for each step.

See [Retry a Step Now](/workflow/howto/retry-now) for more details.

## OpenAPI

````yaml workflow/openapi.yaml post /v2/messages/{messageId}/retry
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-{region}.upstash.io
    description: Regional
    variables:
      region:
        default: eu-central-1
        enum:
          - us-east-1
          - eu-central-1
security:
  - bearerAuth: []
  - bearerAuthQuery: []
paths:
  /v2/messages/{messageId}/retry:
    post:
      tags:
        - Runs
      summary: Retry a Step Now
      description: Execute a workflow step that is waiting for its next retry immediately
      x-mint:
        content: >
          When a step fails, Upstash Workflow schedules the next attempt
          according to the configured retry delay. This endpoint skips the
          remaining wait and executes the step right away, so the workflow run
          can continue without waiting.


          Retrying now does not add an extra attempt. It moves the already
          scheduled retry forward, so the retry count and the remaining retries
          stay the same.


          The `messageId` of a retrying step is available in the step details
          returned by the
          [logs](/workflow/api-reference/logs/list-workflow-run-logs) endpoint.
          Steps waiting for a retry have a `nextDeliveryTime`. If multiple
          parallel steps are waiting for a retry, call this endpoint once for
          each step.


          See [Retry a Step Now](/workflow/howto/retry-now) for more details.
      parameters:
        - in: path
          name: messageId
          required: true
          schema:
            type: string
          description: The message ID of the retrying step.
      responses:
        "200":
          description: The step is scheduled for immediate execution.
        "400":
          description: The message id is invalid.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Step not found, or the step is not waiting for a retry.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  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
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
````
