---
title: "Deletes a task by its Task ID, enforcing the same business rules as the Avaza web app."
method: DELETE
path: "/api/Task/{id}"
tags: ["Task"]
---

# Deletes a task by its Task ID, enforcing the same business rules as the Avaza web app.

`DELETE /api/Task/{id}`

Deletes the task and its entire subtask tree along with related data (assignments, followers,
tags, dependencies, comments, and recurring-task links). Task file attachments are flagged for
asynchronous removal from storage. Deletion is blocked (409) when the task or any of its subtasks
has linked timesheets, invoiced fixed amounts, expenses, or schedule bookings.
            
Example request:  DELETE /api/Task/3003344
Example response (200):  { "taskID": 3003344, "isDeleted": true }

## Path parameters

- `id` integer, required

## Query parameters

- `SendWebhooks` boolean

## Response `200`

The task was deleted successfully.

- object

## Other responses

- `403` — The authenticated user does not have permission to delete this task.
- `404` — No task with the given ID was found.
- `409` — Deletion is blocked because the task or a subtask has linked timesheets, invoiced fixed amounts, expenses, or schedule bookings.

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
