---
title: "Purge old ledger entries."
method: DELETE
path: "/api/ledger"
tags: ["Redaction Ledger"]
---

# Purge old ledger entries.

`DELETE /api/ledger`

Deletes ledger entries older than the given number of days. The ledger is kept indefinitely by default, so this is how stale entries are pruned on demand. Requires an administrator and LEDGER_DELETION_ENABLED=true. Admins may purge another user's entries by passing that user's username as owner, which additionally requires ADMIN_CROSS_USER_ACCESS_ENABLED=true.

## Query parameters

- `older_than_days` integer, required
- `owner` string

## Headers

- `Authorization` string, required

## Response `200`

OK

## Other responses

- `400`
- `401`
- `403` — The caller is not an administrator, or ledger deletion is disabled for this deployment.
- `404` — Not Found
- `413` — Content Too Large
- `423` — One or more active legal holds protect entries in this user's ledger. Release all holds before purging.
- `500` — Internal Server Error
- `503` — Service Unavailable

## Changes

- **2026-08-03** `e46672d44401` — 1 info
  - added the non-success response with the status `413`
- **2026-08-03** `cd2c6066b0d2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/philterd/apis/philter-api/changes/api/ledger/delete.md)

---

[API](https://skmtc.dev/philterd/apis/philter-api.md) · [All operations](https://skmtc.dev/philterd/apis/philter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/philterd/philter-api/revisions/755bc1bbdc38/schema)
