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

# Cancel a run

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

## Request

- Base URL: `https://unbrowse.ai`
- URL: `https://unbrowse.ai/api/v1/runs/{runId}/cancel`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://unbrowse.ai/authorize`, token URL `https://unbrowse.ai/oauth/token`, scopes: `unbrowse`)
  - HTTP bearer

## Path parameters

- `runId` string, required

## Response `200`

The run

- Run
  - `runId` string, required
  - `status` 'accepted' | 'working' | 'input_required' | 'succeeded' | 'failed' | 'outcome_unknown' | 'cancelled' | 'expired', required
  - `capabilityId` string, nullable
  - `phase` string
  - `stateRevision` integer
  - `result` unknown
  - `requirements` Object[]: What the run needs (status input_required).
  - `error` Object
  - `verified` boolean

## Other responses

- `400`: An error
- `401`: Missing or invalid credentials. The WWW-Authenticate header names the protected-resource metadata.
- `402`: An error
- `404`: An error
- `429`: An error

---

[API](https://skmtc.dev/unbrowse/apis/unbrowse-api.md) · [All operations](https://skmtc.dev/unbrowse/apis/unbrowse-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unbrowse/apis/unbrowse-api/revisions/f49034a1fbff?raw)
