---
title: "Rollback a project"
method: POST
path: "/projects/{project_id}/rollback"
tags: ["Rollback"]
---

# Rollback a project

`POST /projects/{project_id}/rollback`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/projects/{project_id}/rollback`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Performs a rollback operation by triggering a rollback pipeline.

## Path parameters

- `project_id` string, required

## Request body

- RollbackProjectRequest
  - `component_name` string, required: The component name
  - `current_version` string, required: The current version
  - `environment_name` string, required: The environment name
  - `namespace` string: The namespace
  - `parameters` object: The extra parameters for the rollback pipeline
  - `reason` string: The reason for the rollback
  - `target_version` string, required: The target version

## Response `202`

Rollback request accepted.

- RollbackProjectResponse
  - `id` string, uuid: The ID of the rollback pipeline or the command created to handle the rollback
  - `rollback_type` string: The type of the rollback

## Other responses

- `400`: Unexpected request body provided.
- `404`: Entity not found.
- `409`: A conflict has occurred while attempting to create the resource.
- `500`: Internal server error.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
