---
title: "Delete task"
method: DELETE
path: "/task/{id}"
tags: ["task"]
---

# Delete task

`DELETE /task/{id}`

Deletes a task. Upon success, it returns the ID of the deleted task.

## Path parameters

- `id` number, required

## Query parameters

- `api_key` string, required

## Response `200`

ID of the deleted task

- object
  - `task_delete` InlineResponse2004TaskDelete
    - `id` string — ID of the deleted task, a positive integer

## Other responses

- `412` — Precondition failed. An error code and message are returned. 450 - Please provide API key. In order to remove your content, please authenticate. 451 - Authentication failed. The API key was not valid. Please try to login again, or contact api administrators. 452 - Task does not exists. The task ID could not be linked to an existing task. 454 - Task is executed in some runs. Delete these first. 455 - Deleting the task failed. Please contact support team.

---

[API](https://skmtc.net/openml/apis/openml-api.md) · [All operations](https://skmtc.net/openml/apis/openml-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openml/openml-api/revisions/263d3d6ee586/schema)
