---
title: "Cancel a running assessment"
method: POST
path: "/api/v1/run/{run_id}/cancel"
tags: ["assessment"]
---

# Cancel a running assessment

`POST /api/v1/run/{run_id}/cancel`

## Request

- Base URL: `https://api.enokilabs.ai`
- URL: `https://api.enokilabs.ai/api/v1/run/{run_id}/cancel`
- Auth: none declared

Ask a running assessment to stop. It stops within about five seconds and is finalised as `cancelled`, keeping the findings it had already produced, so a cancelled run is still worth reading. 202 means the request was recorded, not that the run has stopped: poll `GET /api/v1/run/{run_id}` until its status leaves `running`. Requires the same `test:run` scope as triggering, because stopping a run is the same authority over the same resource.

**A cancelled run is not a passing run.** `GET /api/v1/run/{run_id}` still computes a `min_severity` verdict once the status is terminal, and on a cancelled run that verdict covers only the categories in `categories_completed` -- a run stopped at minute two of twenty reads `pass` because it never got far enough to find anything. A pipeline that gates on the verdict alone must compare `categories_completed` against `categories_planned`, or treat `cancelled` as its own outcome.

## Path parameters

- `run_id` string, required

## Headers

- `Authorization` string, nullable: Bearer token with API key

## Response `202`

Successful Response

- unknown

## Other responses

- `404`: Run not found
- `409`: Run is not running, so there is nothing to cancel
- `422`: Validation Error

---

[API](https://skmtc.dev/enokilabs/apis/enoki-external-api.md) · [All operations](https://skmtc.dev/enokilabs/apis/enoki-external-api/llms.txt) · [OpenAPI document](https://skmtc.dev/enokilabs/apis/enoki-external-api/revisions/9b13fb6ab124?raw)
