---
title: "Cancel a unified execution"
method: POST
path: "/api/v1/unified/executions/{id}/cancel"
tags: ["Unified Executions"]
---

# Cancel a unified execution

`POST /api/v1/unified/executions/{id}/cancel`

## Request

- Base URL: `https://orchestrator.getaxonflow.com`
- URL: `https://orchestrator.getaxonflow.com/api/v1/unified/executions/{id}/cancel`
- Auth: none declared. Required headers: `X-Tenant-ID`, `X-Org-ID`
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/docs/api/v1/unified/executions/:id/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancels a running MAP plan or WCP workflow through the unified API.
The cancellation propagates to the owning subsystem (plan cancel or
workflow abort). Cancelling an execution already in a terminal state
returns 409.

## Path parameters

- `id` string, required

## Headers

- `X-Tenant-ID` string, required
- `X-Org-ID` string, required

## Request body

- object
  - `reason` string: Cancellation reason (defaults to "cancelled via unified API")

## Response `200`

Execution cancelled; returns the refreshed unified status record
(or a `{execution_id, status: "cancelled", message}` fallback if
the post-cancel re-read fails).

- UnifiedExecutionStatus: Unified status record covering both MAP plans and WCP workflows. Distinct from the replay Execution schema and from the MAP StepStatus schema.
  - `execution_id` string
  - `execution_type` 'map_plan' | 'wcp_workflow'
  - `name` string
  - `source` string
  - `status` 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'aborted' | 'expired'
  - `current_step_index` integer
  - `total_steps` integer
  - `progress_percent` number, double
  - `started_at` string, date-time
  - `completed_at` string, date-time
  - `duration` string
  - `estimated_cost_usd` number, double
  - `actual_cost_usd` number, double
  - `steps` UnifiedStepStatus[]
    - `step_id` string
    - `step_index` integer
    - `step_name` string
    - `step_type` 'llm_call' | 'tool_call' | 'connector_call' | 'human_task' | 'synthesis' | 'action' | 'gate'
    - `status` 'pending' | 'running' | 'completed' | 'failed' | 'skipped' | 'blocked' | 'approval'
    - `started_at` string, date-time
    - `ended_at` string, date-time
    - `duration` string
    - `decision` 'allow' | 'block' | 'require_approval'
    - `decision_reason` string
    - `policies_matched` string[]
    - `approval_status` 'pending' | 'approved' | 'rejected' | 'expired'
    - `approved_by` string
    - `approved_at` string, date-time
    - `rejected_by` string
    - `rejected_at` string, date-time
    - `model` string
    - `provider` string
    - `cost_usd` number, double
    - `tokens_in` integer
    - `tokens_out` integer
    - `input` unknown
    - `output` unknown
    - `result_summary` string
    - `error` string
  - `error` string
  - `tenant_id` string
  - `org_id` string
  - `user_id` string
  - `client_id` string
  - `metadata` object
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Missing execution id or unknown execution type
- `401`: Missing tenant or org identity headers
- `404`: Execution not found (or belongs to another tenant/org)
- `409`: Execution is already in a terminal state
- `500`: Cancellation failed

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/revisions/f408ef3ec9dd?raw)
