> For the complete documentation index, see [llms.txt](https://docs.peakcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peakcommerce.com/product/settings/observability/audit-log-retention.md). Agents can also search and read this documentation through its [MCP server](https://docs.peakcommerce.com/~gitbook/mcp).

# Audit Log Retention

**Settings → Audit Log Retention** controls how long audit-log entries are kept for your tenant. Set the retention window to match your compliance and record-keeping needs; older entries are pruned automatically.

## Why it matters

Audit logs are your record of who did what. Keeping them forever bloats the log and can conflict with data-minimization policies; pruning too aggressively can leave you unable to investigate an incident or satisfy an auditor. This page lets you strike that balance — and keep noisy, low-value events for less time than sensitive ones.

## What it shows

* **Default retention (days)** — the fallback window applied to any category you don't override.
* **Per-category retention** — separate windows for each class of event:
  * **Authentication** — sign-ins, sign-outs, impersonation (default 30 days).
  * **Security** — permission, policy, and API-key changes (default 365 days).
  * **Admin & Configuration** — settings, users, profiles, integrations (default 365 days).
  * **Data Access** — reads, downloads, exports, views (default 30 days).
  * **Data Changes** — creates, updates, deletes, business activity (default 90 days).
  * **System** — background jobs and platform events (default 90 days).
  * **Other** — anything uncategorized (default 90 days).

Windows can be set from 1 day up to 3650 days (10 years).

## How to use it

* Lengthen **Security** and **Admin** retention to meet audit requirements; shorten noisy **Authentication** and **Data Access** categories to control log size.
* A category you leave untouched falls back to that category's platform default — not to your tenant default.

## Gotchas

* Pruning is a **hard delete** run by a periodic background sweep — once entries age out they cannot be recovered, so set windows deliberately.
* Even a tenant that never opens this page gets bounded retention via the defaults above.
* Each sweep records its own entry in the audit trail, so the log notes that it was pruned.

## Related

* [Audit Trail & Logs](https://docs.peakcommerce.com/product/reporting-and-analytics/audit-trail-and-logs.md) — what the log records.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peakcommerce.com/product/settings/observability/audit-log-retention.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
