---
title: "Cancel Build"
method: POST
path: "/api/v1/build/{job_id}/cancel"
tags: ["Chat"]
---

# Cancel Build

`POST /api/v1/build/{job_id}/cancel`

Cancel a specific build job.

Requires authentication and ownership verification to prevent a user from
aborting another user's running build (DoS via job cancellation).
Jobs with no registered owner (build_public_tmp) are accessible to any
authenticated user, consistent with get_build_events.

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- CancelFlowResponse — Response model for flow build cancellation.
  - `message` string, required
  - `success` boolean, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-12** `830c31118215` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-03-06** `0be341779529` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearer` was removed from the API
- **2026-02-18** `191b57fc530b` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearer` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was removed from the API
- **2026-02-10** `0be341779529` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearer` was removed from the API
- **2025-12-23** `b0ee9ddb8d9f` — 3 info
  - the endpoint scheme security `API key header` was added to the API
  - the endpoint scheme security `API key query` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearer` was added to the API

[Full history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v1/build/:job_id/cancel/post.md)

---

[API](https://skmtc.dev/langflow-ai/apis/langflow.md) · [All operations](https://skmtc.dev/langflow-ai/apis/langflow/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langflow-ai/langflow/revisions/088c1fc24528/schema)
