---
title: "Trigger Nightly Prune"
method: POST
path: "/api/admin/archive/run-nightly"
---

# Trigger Nightly Prune

`POST /api/admin/archive/run-nightly`

## Request

- Base URL: `https://www.awardflightdaily.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.awardflightdaily.com/api/admin/archive/run-nightly`
- Auth: none declared

Trigger the nightly prune: DELETE rows where date < today OR expired_at IS NOT NULL.

JSON body (all optional):
  cutoff_date: prune rows with date < this. Default: today (UTC).
  max_rows:    hard cap on rows deleted in this run. Default: 5,000,000.

Returns immediately; runs in a background thread.
Poll /api/admin/archive/status for progress.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/awardflightdaily/apis/award-flight-database.md) · [All operations](https://skmtc.dev/awardflightdaily/apis/award-flight-database/llms.txt) · [OpenAPI document](https://skmtc.dev/awardflightdaily/apis/award-flight-database/revisions/93e62de446f9?raw)
