---
title: "Set audit record retention"
method: PUT
path: "/data-retention/audit-records"
tags: ["Data Retention"]
---

# Set audit record retention

`PUT /data-retention/audit-records`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/data-retention/audit-records`
- Auth: HTTP bearer

Sets how long audit records are kept. Body: { months: 12 | 24 | 36 | 60 | 84 | 120 | null }, where null keeps records indefinitely. The change is recorded in the audit ledger. Admin only.

## Response `200`

Success

## Other responses

- `400`: Invalid retention period
- `403`: Admin access required
- `500`: Internal server error

## Changes

- **2026-10-12** `853aa04f7cb0`: 1 info
  - endpoint added
- **2026-10-12** `08630a8e6075`: 1 breaking
  - api path removed without deprecation
- **2026-10-12** `f120c4c3fdca`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/verifywise-ai/apis/verifywise-api/changes/data-retention/audit-records/put.md)

---

[API](https://skmtc.dev/verifywise-ai/apis/verifywise-api.md) - [All operations](https://skmtc.dev/verifywise-ai/apis/verifywise-api/llms.txt) - [OpenAPI document](https://skmtc.dev/verifywise-ai/apis/verifywise-api/revisions/9ccf3d4f3918?raw)
