> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Task

> Delete a task, or reject a draft.

Deleting a task also removes its subtasks. Rejecting a draft is the same operation — delete the draft task. Returns `204 No Content` on success.

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request DELETE 'https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba", {
    method: "DELETE",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
  });
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
  }

  response = requests.delete(url, headers=headers)
  print(response.status_code)
  ```
</RequestExample>

<ResponseExample>
  ```text Response theme={null}
  204 No Content
  ```
</ResponseExample>
