Delete a task
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0?cascade=false';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
The task UUID
Query Parameters
Section titled “Query Parameters”If true, delete task and all dependent tasks recursively
Responses
Section titled “Responses”Task deleted successfully
object
Number of tasks deleted (more than 1 for cascade)
Example
{ "deleted": true, "deletedCount": 1}Task not found
Task has dependents - cannot delete without cascade
object
Example
{ "error": "TASK_HAS_DEPENDENTS", "message": "Cannot delete task with 3 dependent task(s). Use cascade=true to delete all."}Failed to delete task
