---
title: "Delete a session and its context"
method: DELETE
path: "/v1/sessions/{sessionID}"
tags: ["Sessions"]
---

# Delete a session and its context

`DELETE /v1/sessions/{sessionID}`

## Request

- Base URL: `https://api.spicrawl.com`
- URL: `https://api.spicrawl.com/v1/sessions/{sessionID}`
- Auth: HTTP bearer

Removes the session row and purges its context permanently. Unlike release, the id stops resolving
afterwards. Request-log entries that reference the session survive.

Pitfalls:
- Idempotent: deleting an unknown or already-deleted id returns 204 (including another tenant's id),
  so a 204 does not prove the session existed.
- While a render holds the lease, returns 409 `ERR::SESSION::BUSY` with `Retry-After`. Wait, or repeat
  with `force=true` to delete anyway and fail the running task.

## Query parameters

- `force` boolean

## Response `204`

Deleted, or did not exist.

## Other responses

- `400`: The request is invalid. Not retryable; fix the request using `code` and `diagnostics.hint`.
- `401`: Missing, invalid, revoked or expired key. Not retryable with the same key.
- `403`: The key lacks the scope this route requires (`ERR::AUTH::INSUFFICIENT_SCOPE`), or the action is not permitted.
- `404`: No such resource for this key's organization.
- `409`: Conflicts with the resource's current state, for example a session in use (`ERR::SESSION::BUSY`, retryable).
- `500`: Internal error. Retryable when `retryable` is true.

---

[API](https://skmtc.dev/spicrawl/apis/spicrawl-api.md) · [All operations](https://skmtc.dev/spicrawl/apis/spicrawl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spicrawl/apis/spicrawl-api/revisions/c4b4c6f97219?raw)
