Documentation Index
Fetch the complete documentation index at: https://docs.chamelio.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Authentication
This endpoint requires authentication via API key. Include your API key in theX-API-Key header:
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | integer | Yes | Unique identifier for the task to cancel |
Request Example
Response
Success Response
Status Code:200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
task_id | integer | ID of the cancelled task |
status | string | Updated task status (should be "cancelled") |
message | string | Success confirmation message |
Error Responses
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.404 Not Found
Returned when the task doesn’t exist or you don’t have access to it.409 Conflict
Returned when the task cannot be cancelled (e.g., already completed or already cancelled).500 Internal Server Error
Returned when cancellation fails due to a server error.Notes
Only tasks with status
pending or in_progress can be cancelled. Completed, failed, or already cancelled tasks cannot be cancelled.Use Cases
This endpoint is useful for:- User-initiated cancellation - Allow users to stop workflows they no longer need
- Error handling - Cancel workflows that are stuck or encountering issues
- Workflow management - Clean up unnecessary or duplicate workflow instances
- Resource optimization - Stop workflows that are no longer relevant to free up resources