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

# Rollback

> Roll back to an earlier successful deployment. Queues a new deployment to the same environment the target deployed to, pinned to the target's exact commit (not its branch), and builds it through the normal pipeline. Only deployments that are "ready" and carry a recorded commit can be rolled back to.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/projects/{projectId}/deploys/{deployId}/rollback
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/deploys/{deployId}/rollback:
    post:
      tags:
        - deploys
      summary: Rollback
      description: >-
        Roll back to an earlier successful deployment. Queues a new deployment
        to the same environment the target deployed to, pinned to the target's
        exact commit (not its branch), and builds it through the normal
        pipeline. Only deployments that are "ready" and carry a recorded commit
        can be rolled back to.
      operationId: deploys.rollback
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: deployId
          in: path
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Rollback deployment accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - queued
                      - building
                      - deploying
                      - ready
                      - failed
                required:
                  - id
                  - status
        '402':
          description: Organization billing is not active.
        '404':
          description: No such deployment in this project.
        '422':
          description: >-
            Only successful deployments with a recorded commit can be rolled
            back to.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````