---
title: "Cancel a Cloudflare Workflow run created through kody:runtime workflows.create by id."
method: POST
path: "/v1/workflow-runs/{id}/cancel"
tags: ["jobs"]
---

# Cancel a Cloudflare Workflow run created through kody:runtime workflows.create by id.

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

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/workflow-runs/{id}/cancel`
- Auth: HTTP bearer

Cancel a Cloudflare Workflow run created through kody:runtime workflows.create by id. Terminates the underlying workflow instance and marks the run cancelled; cancelling an already-finished run is a safe no-op.

Org permission: `job:execute`.

## Path parameters

- `id` string, required: Workflow run id from workflowRunList or workflows.create output (dynwf-… inline runs or pkgwf-… package runs).

## Request body

- object

## Response `200`

Success.

- object
  - `id` string, required
  - `cancelled` boolean, required
  - `already_terminal` boolean, required
  - `status` 'queued' | 'running' | 'paused' | 'waiting' | 'waitingForPause' | 'unknown' | 'complete' | 'errored' | 'terminated' | 'cancelled', nullable, required
  - `message` string, required

## Other responses

- `400`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `401`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `403`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `404`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `409`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `413`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `429`: Too many requests (edge IP/token limit) or an entitlement / plan-cap limit. Wait at least `Retry-After` seconds before retrying.
- `500`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `503`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `default`: Error envelope `{ "error": { "code", "message", "details"? } }`.

---

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