---
title: "Delete Library Session"
method: DELETE
path: "/library/session/{cid}"
---

# Delete Library Session

`DELETE /library/session/{cid}`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/library/session/{cid}`
- Auth: none declared

PERMANENTLY delete a saved session from the caller's PRIVATE library. Fast — no log rewrite in
the request: the entry is hidden at once (stops listing; fetch/resume answer 404) and one
erasure-ledger line (ids and dates only) per item — the private collection and its session
member — is appended. That line is the durable commitment: the batched erase worker
(collector/erasure.deferred_erase_loop) erases every stored version through the GDPR hard-erase
path within LIBRARY_ERASE_WINDOW_HOURS, many deletes in one log rewrite, and replay_ledger
re-applies it after any restore. No grace period, no undo. Answers 202 `erasure_scheduled`.

Account-scoped — a signed-in human can only delete their OWN entries (anything else is 404 and
nothing is scheduled). Accepts a collection id, a session id, or a name/label (?name=).
Kept, and listed in `retained`: published copies in a workspace, buyers' copies and escrow,
billing/entitlement records, forks of this entry, backups until they expire. Idempotent: a
repeat answers 202 `erasure_scheduled` until the worker is done, then 200 `already_erased`;
an unknown id is 404 as before.

## Path parameters

- `cid` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
