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

# Cancel run

`POST /api/v1/runs/{id}/cancel`

Cancel a queued run or request cancellation of an in-flight run.

## Path parameters

- `id` string, required

## Response `200`

Cancellation result

- RunCancelResponse
  - `id` string, required
  - `type` 'workflow' | 'agent', required
  - `finished` boolean, required — True when the run has reached a terminal status.
  - `execution` object, required
    - `status` 'created' | 'pending' | 'running' | 'waiting' | 'finalizing' | 'completed' | 'failed' | 'cancelled' | 'rejected', required
  - `cancellation` object, required
    - `state` 'cancelled' | 'requested' | 'already_terminal', required — `cancelled` — the run was terminated immediately (it had not started). `requested` — the run is in-flight; cancellation was requested and the status will become `cancelled` shortly. `already_terminal` — the run had already finished; nothing changed.
    - `wasStatus` 'created' | 'pending' | 'running' | 'waiting' | 'finalizing' | 'completed' | 'failed' | 'cancelled' | 'rejected', required

## Other responses

- `400` — Validation error. Request shape did not match the spec.
- `401` — Missing or invalid API key
- `403` — API key lacks required scope
- `404` — Resource not found
- `413` — Payload too large. Upload exceeded the per-request size cap.
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.dev/eigenpal/apis/eigenpal-api.md) · [All operations](https://skmtc.dev/eigenpal/apis/eigenpal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/eigenpal/eigenpal-api/revisions/dddcddf1975c/schema)
