# Cancel/terminate a task

`DELETE /tasks/{id}`

:::code-group
```bash title="cURL"
curl --request DELETE \
  --url https://{host}/api/tasks/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "<string>",
  "target": "<string>",
  "pinecone_api_key": "<string>",
  "user_token": "<string>"
}'
```

```json title="404"
{
  "message": "<string>",
  "code": "<string>"
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `id` (path, string, required) — Task id.

## Headers

- `X-Pinecone-Api-Version` (header, string) — Date-based contract version, echoed back on the same header. Omit for the default (`2026-07`); send `unstable` for the in-development surface. An unrecognized value is rejected with `400 unsupported_api_version`.

## Body

- `reason` (body, string) — Why the task is being terminated, recorded on the row.
- `target` (body, string) — Which part of the task to terminate. Defaults to the whole task.
- `pinecone_api_key` (body, string) — Task-token override; normally not needed.
- `user_token` (body, string) — Caller-token override; normally not needed.

## Response

- `200` — Termination enqueued (empty body)
- `404` — Not found
- `504` — Task did not terminate in time

## Related pages

- [List tasks (project-wide, paginated)](./data-plane-tasks-list-tasks-project-wide-paginated.md)
- [Get a task (with steps)](./data-plane-tasks-get-a-task-with-steps.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
