---
title: "Expedite purge on a trashed library"
method: DELETE
path: "/api/libraries/{library_id}"
tags: ["libraries"]
---

# Expedite purge on a trashed library

`DELETE /api/libraries/{library_id}`

Expedites the background purge on a **trashed** library: the 90-day undo window is waived and the drain begins claiming this library on the next scheduled tick. Returns immediately; the drain proceeds asynchronously in bounded batches and does not block on completion. `restore_library` still works until the drain finishes purging all assets, but past this point it will recover only the assets the drain hasn't gotten to yet. Returns 409 if the library has not been trashed yet — call `trash_library` first.

## Path parameters

- `library_id` string, required — Library ID (with `lib_` prefix) of the trashed library to expedite.

## Response `200`

Successful Response

- DeletionResponse — Acknowledgment body returned by destructive endpoints (delete / trash / restore / permanently delete / remove-from-album / empty-trash). Carries no fields — the HTTP 200 + empty JSON object is itself the success signal. Exists so MCP tools generated from these endpoints have a real ``outputSchema`` (rather than the null schema FastMCP emits for 204 responses), which ChatGPT's MCP submission tooling requires.

## Other responses

- `401` — Missing, invalid, or expired credentials.
- `403` — The credentials are valid but not authorized for this operation — for example an API key whose action or library scope excludes it, or a credential type this operation does not accept.
- `404` — Not found
- `409` — Library is not trashed
- `422` — Validation Error
- `429` — Rate limit exceeded. Retry after the interval in the `Retry-After` header.

---

[API](https://skmtc.net/gumnut-ai/apis/gumnut-api.md) · [All operations](https://skmtc.net/gumnut-ai/apis/gumnut-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gumnut-ai/gumnut-api/versions/e71db45f5d4a/schema)
