Delete a task
DELETE /api/v3/organizations/{organisation}/ai/tasks/{taskId}
Permanently deletes a task. This action cannot be undone.
*
* Dependency Protection:
* By default, deletion is blocked if other tasks depend on this task (TASK_HAS_DEPENDENTS error).
* This prevents breaking workflows.
*
* Cascade Delete:
* Use ?cascade=true to delete the task AND all tasks that depend on it recursively.
* Useful for cleaning up entire dependency chains.
*
* Examples:
* - DELETE /tasks/{id} - Deletes task if no dependents, otherwise returns 409 error
* - DELETE /tasks/{id}?cascade=true - Deletes task and all dependent tasks
Authorizations
Parameters
Path Parameters
The organisation ID
The task UUID
Query Parameters
If true, delete task and all dependent tasks recursively
Responses
200
Task deleted successfully
object
trueNumber of tasks deleted (more than 1 for cascade)
1404
Task not found
409
Task has dependents - cannot delete without cascade
object
TASK_HAS_DEPENDENTSCannot delete task with 3 dependent task(s). Use cascade=true to delete all.500
Failed to delete task