Skip to main content

Cancel Execution

Cancel a running workflow execution.

POST /api/v1/executions/:id/cancel

Required Scopes: executions:read, executions:cancel

Request

Path Parameters

ParameterTypeDescription
idstringExecution ID

Example

curl -X POST "https://api.flowmaestro.io/api/v1/executions/exec_xyz789/cancel" \
-H "X-API-Key: fm_live_your_api_key"

Response

{
"data": {
"id": "exec_xyz789",
"workflow_id": "wf_abc123",
"status": "cancelled",
"cancelled_at": "2024-01-15T10:30:02.000Z"
},
"meta": {
"request_id": "...",
"timestamp": "..."
}
}

Errors

StatusCodeDescription
404resource_not_foundExecution not found
400validation_errorExecution is not in a cancellable state