# Retry a Message Now

> Deliver a message that is waiting for its next retry immediately

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

When a delivery fails, QStash schedules the next attempt according to the message's retry delay. This endpoint skips the remaining wait and delivers the message right away.

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.

You can find messages waiting for a retry by listing the [logs](/qstash/api-reference/logs/list-logs) with `state=RETRY`.

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

<Note>
Messages published to a [queue](/qstash/features/queues) can not be rescheduled to retry now. The request returns `400` for them.
</Note>

## OpenAPI

````yaml qstash/openapi.yaml post /v2/messages/{messageId}/retry
openapi: 3.1.0
info:
  title: QStash REST API
  description: |
    QStash is a message queue and scheduler built on top of 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: []
tags:
  - name: Messages
    description: Publish and manage messages
  - name: Queues
    description: Manage message queues
  - name: Schedules
    description: Create and manage scheduled messages
  - name: URL Groups
    description: Manage URL groups and endpoints
  - name: DLQ
    description: Dead Letter Queue operations
  - name: Logs
    description: Log operations
  - name: Signing Keys
    description: Manage signing keys
  - name: Flow Control
    description: Monitor flow control keys
  - name: Bulk Actions
    description: Track filter-based bulk operations
paths:
  /v2/messages/{messageId}/retry:
    post:
      summary: Retry a Message Now
      description: Deliver a message that is waiting for its next retry immediately
      tags:
        - Messages
      x-mint:
        content: >
          When a delivery fails, QStash schedules the next attempt according to
          the message's retry delay. This endpoint skips the remaining wait and
          delivers the message right away.


          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.


          You can find messages waiting for a retry by listing the
          [logs](/qstash/api-reference/logs/list-logs) with `state=RETRY`.


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


          <Note>

          Messages published to a [queue](/qstash/features/queues) can not be
          rescheduled to retry now. The request returns `400` for them.

          </Note>
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the message to retry.
      responses:
        "200":
          description: The message is rescheduled for immediate delivery.
        "400":
          description: The message id is invalid, or the message belongs to a queue.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: Message not found, or the message is not waiting for a retry.
          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
````
