---
title: "Rebuilds a pipeline"
method: POST
path: "/apps/{app-slug}/pipelines/{pipeline-id}/rebuild"
tags: ["pipelines"]
---

# Rebuilds a pipeline

`POST /apps/{app-slug}/pipelines/{pipeline-id}/rebuild`

## Request

- Base URL: `https://api.bitrise.io/v0.1`
- URL: `https://api.bitrise.io/v0.1/apps/{app-slug}/pipelines/{pipeline-id}/rebuild`
- Auth: API key in header `Authorization`

Rebuilds a pipeline. You can rebuild the whole pipeline or only the unsuccessful and subsequent workflows by setting the partial flag to true.

## Path parameters

- `app-slug` string, required
- `pipeline-id` string, required

## Request body

- V0PipelineRebuildParams
  - `partial` boolean
  - `triggered_by` string

## Response `201`

Created

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `412`: Precondition Failed
- `500`: Internal Server Error

## Changes

- **2023-12-06** `2df0eb61f19c`: 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the success response with the status `201`
- **2023-03-21** `274eb91c5877`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bitrise/apis/bitrise-api/changes/apps/:app-slug/pipelines/:pipeline-id/rebuild/post.md)

---

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