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

# Cancel a browser run

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

## Request

- Base URL: `https://console.nace.ai`
- URL: `https://console.nace.ai/v1/browser/runs/{id}/cancel`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nace/apis/drex-api/docs/v1/browser/runs/:id/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancels a queued or running run and stops its browser. Queued and running runs cancelled before completion are not charged. Cancelling a cancelled run answers the same again.

## Path parameters

- `id` string, required

## Response `200`

The run, cancelled.

- BrowserRunRef
  - `id` string, required
  - `object` 'browser_run', required
  - `status` 'queued' | 'running' | 'succeeded' | 'partial' | 'failed' | 'cancelled' | 'timed_out', required: `queued` → `running` → one of `succeeded`, `partial`, `failed`, `cancelled`, `timed_out`.
  - `created_at` string, date-time

## Other responses

- `401`: Missing or invalid API key (`authentication_error`, code `invalid_api_key`).
- `404`: No browser run with this id for this account (`not_found_error`, code `not_found`). Another account's run answers the same. While browser runs are not available on a deployment, every browser route answers a plain `404`.
- `409`: The run already finished another way (`conflict_error`, code `run_finished`).
- `429`: Over the account's requests per minute for browser routes (`rate_limit_error`, code `rate_limited`).
- `500`: Something failed on Drex's side (`internal_error`). Retry.

---

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