---
title: "Purge the audit trail"
method: DELETE
path: "/v1/audit/tools"
tags: ["System"]
---

# Purge the audit trail

`DELETE /v1/audit/tools`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/audit/tools`
- Auth: HTTP bearer

Removes every record, the permanent rollup, and both files, then rotates `trailId` and restarts the sequence at 1 so a collector detects the reset. Collection itself has no off switch, but the data is the user's. Refused with 403 `principal_forbidden` for the `unauthenticated-loopback` principal — a caller that presented no credential must not be able to erase the record of itself.

## Response `200`

What the purge removed

- object
  - `purgedRecords` integer, required
  - `purgedRollupRows` integer, required
  - `trailId` string, required: The NEW cursor space.

## Other responses

- `403`: Refused for an unauthenticated principal

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
