Skip to content

Delete a task

DELETE
/api/v3/organizations/{organisation}/ai/tasks/{taskId}
curl --request DELETE \
--url 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0?cascade=false' \
--header 'Authorization: Bearer <token>'

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

organisation
required
string

The organisation ID

taskId
required
string format: uuid

The task UUID

cascade
boolean

If true, delete task and all dependent tasks recursively

Task deleted successfully

Media typeapplication/json
object
deleted
boolean
deletedCount

Number of tasks deleted (more than 1 for cascade)

integer
deletedTaskIds
Array<string>
Example
{
"deleted": true,
"deletedCount": 1
}

Task not found

Task has dependents - cannot delete without cascade

Media typeapplication/json
object
error
string
message
string
dependentTaskIds
Array<string>
Example
{
"error": "TASK_HAS_DEPENDENTS",
"message": "Cannot delete task with 3 dependent task(s). Use cascade=true to delete all."
}

Failed to delete task