---
title: "Cancel a run"
method: POST
path: "/runs/{id}/cancel"
tags: ["Runs"]
---

# Cancel a run

`POST /runs/{id}/cancel`

## Request

- Base URL: `https://workflow.loopfour.ai/api/v1`
- URL: `https://workflow.loopfour.ai/api/v1/runs/{id}/cancel`
- Auth: API key in header `x-api-key`

Cancels a running or pending workflow run.

## Path parameters

- `id` string, required

## Response `200`

Run cancelled

- object
  - `success` unknown
  - `data` object
    - `id` string
    - `status` string
    - `cancelled` boolean
    - `triggerDevCancelled` boolean
    - `message` string

## Other responses

- `400`: Bad request — invalid parameters or request body.
- `401`: Missing or invalid API key.
- `403`: Forbidden — insufficient permissions for this resource.
- `404`: Resource not found.
- `502`: Bad gateway — upstream service error.

---

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