---
title: "Cancel Capture"
method: POST
path: "/api/extension/captures/{capture_id}/cancel"
tags: ["extension"]
---

# Cancel Capture

`POST /api/extension/captures/{capture_id}/cancel`

Cancel a capture, whether or not the worker has already claimed it.

Three outcomes, and the caller must handle all three:

- `{cancelled: True, mode: "stopped"}` — the job had not started (or was
  paused for input), so it is already terminal. Nothing ever ran.
- `{cancelled: True, mode: "requested"}` — the worker owns the run, so we
  stamp `cancel_requested_at` and the runner stops cooperatively at its
  next checkpoint (before any contact is written).
- `{cancelled: False, status: "finished"}` — too late, it already
  completed. **The caller should resolve its row from GET, not hang.**

The worker claims within ~0.5s, so "requested" is the common path in
practice; the guarded pre-claim flip below is the rare fast case.

## Path parameters

- `capture_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/every/apis/every-api.md) · [All operations](https://skmtc.net/every/apis/every-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/every/every-api/versions/f8600f7a4ae3/schema)
