v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0174265626.3 KB
deployments

Rollback deployment

Roll live traffic back to a previous deployment. deploymentId is the deployment to roll back TO; the app's current deployment is used as the rollback source automatically.

The target deployment must be ready, not already shutting down, belong to the production environment, and must not itself be the current deployment.

After a rollback the app is marked as rolled back, which prevents new deployments from automatically taking over live traffic. Promote the rolled-back deployment (or a newer one) to clear this state.

Rollback runs as a durable workflow: this endpoint returns once the rollback is accepted. Poll getDeployment or listDeployments to observe the result.

Required Permissions

Your root key must have one of the following permissions:

  • environment.*.rollback_deployment (to roll back deployments in any environment)
  • environment.<environment_id>.rollback_deployment (to roll back deployments in a specific environment)
post/v2/deployments.rollbackDeployment

Request body

deploymentIdstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

Example request

{
  "deploymentId": "proj_1234abcd"
}

Response

Rollback accepted. Poll getDeployment to observe the result.

dataEmptyResponse required

Empty response object by design. A successful response indicates this operation was successfully executed.

Example response

{
  "meta": {
    "requestId": "req_123"
  }
}