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

# Cancel run by ID

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

Cancel a run by ID. Only runs created via `/v1/automation/run-async` or `/v1/automation/run-sse` can be cancelled. Runs created via the synchronous `/v1/automation/run` endpoint cannot be cancelled.

## Path parameters

- `id` string, required — Run ID

## Response `200`

Run cancelled successfully, or already in terminal state (idempotent)

- object — Response from cancel run endpoint
  - `run_id` string, required — The unique identifier of the run
  - `status` 'CANCELLED' | 'COMPLETED' | 'FAILED', required — The current status of the run. Returns actual status for idempotent responses (e.g., COMPLETED if run already finished)
  - `cancelled_at` string, nullable, required — ISO 8601 timestamp when the run was cancelled, or null if not cancelled
  - `message` string, nullable, required — Additional context about the cancellation result (e.g., "Run already cancelled", "Run already finished")

## Other responses

- `401` — Unauthorized - Invalid or missing API key
- `404` — Run not found or not owned by this API key
- `500` — Internal server error

---

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