---
title: "Cancel a pipeline run"
method: POST
path: "/pipeline_runs/{pipeline_run_id}/cancel"
tags: ["Pipeline Runs"]
---

# Cancel a pipeline run

`POST /pipeline_runs/{pipeline_run_id}/cancel`

## Request

- Base URL: `https://app.getorchestra.io/api/engine/public`
- URL: `https://app.getorchestra.io/api/engine/public/pipeline_runs/{pipeline_run_id}/cancel`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://app.getorchestra.io/oauth/authorize`
    - Token URL: `https://app.getorchestra.io/oauth/token` scopes: `orchestra:write`

Cancel a pipeline run. Call this without a body (or with `force: false`) first — that moves the run to `CANCELLING`. Only pass `force: true` on a follow-up call if the run is still stuck in `CANCELLING`; otherwise the request is rejected with `400`.

## Path parameters

- `pipeline_run_id` string, uuid4, required

## Headers

- `X-Orchestra-Account-Id` string, uuid4, nullable

## Request body

- CancelPipelineRunRequestBody: Optional payload for cancelling a pipeline run.
  - `force` boolean: Force-cancel a run already stuck in 'CANCELLING'. Do not send this on the first cancel call — the run must already be 'CANCELLING', or the request is rejected with 400.

## Response `204`

Operation completed successfully. Empty response body.

## Other responses

- `401`: The request was not authorized. Check the API key and `Authorization` header.
- `403`: The request was forbidden.
- `422`: Validation failed. Check path parameters, query parameters, and JSON request bodies.

## Changes

- **2026-11-03** `e45165e7e223`: 4 info
  - the endpoint scheme security `ApiKey` was added to the API
  - the endpoint scheme security `OAuth` was added to the API
  - the endpoint scheme security `BearerAuth` was removed from the API
  - added the new optional `header` request parameter `X-Orchestra-Account-Id`

[Operation history](https://skmtc.dev/getorchestra/apis/orchestra-api/changes/pipeline_runs/:pipeline_run_id/cancel/post.md)

---

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