--- title: "Cancel Agent Spec execution" description: "Cancel a running Agent Spec execution. Only executions in\n'running' status can be cancelled.\n" source: https://flowdrop.io/docs/api/agent-spec/agentSpecCancelExecution site: FlowDrop documentation --- # Cancel Agent Spec execution `POST /agentspec/executions/{id}/cancel` Cancel a running Agent Spec execution. Only executions in 'running' status can be cancelled. ## Parameters - `id` · in path · string · required — Execution ID from the runtime ## Responses - `200` — Execution cancelled successfully (`application/json`: object) - `404` — Resource not found (`application/json`: ErrorResponse) - `409` — Execution cannot be cancelled (already completed or failed) (`application/json`: ErrorResponse) - `500` — Internal server error (`application/json`: ErrorResponse) *Tags: Agent Spec*