---
title: "Expire Logs"
method: GET
path: "/admin/expire-logs"
tags: ["admin"]
---

# Expire Logs

`GET /admin/expire-logs`

## Request

- Base URL: `https://api.colourmemory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.colourmemory.com/admin/expire-logs`
- Auth: none declared

Security fix (2026-09-02), part 2 -- query_log/mcp_log retention.
dry_run defaults to TRUE: reports what would be deleted, deletes
nothing. Pass dry_run=false to actually delete. Same
report-then-confirm discipline as /admin/expire-anonymous-projects.
The real purge does not depend on this endpoint: main.py's
_start_retention_job runs expire_old_logs(90, dry_run=False) daily.
Use this for a manual dry-run report.

## Query parameters

- `retention_days` integer
- `dry_run` boolean

## Headers

- `x-admin-key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/colourmemory/apis/colour-memory-api.md) · [All operations](https://skmtc.dev/colourmemory/apis/colour-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/colourmemory/apis/colour-memory-api/revisions/4ba028f64042?raw)
