# RetentionPolicy

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/http-api/schemas/retentionpolicy/
> Summary: OpenAPI request or response schema for RetentionPolicy, including required fields, defaults, constraints, and linked nested types.

[← All HTTP schemas](/http-api/schemas/)

An age- and volume-based retention rule for a target.

**Shape:** `object`

| Property | Required | Type | Description | Rules |
|---|---|---|---|---|
| `id` | yes | `string (uuid)` | The policy identifier. | — |
| `tenantId` | yes | `string` | The tenant identifier. `"*"` means the default for all tenants. | — |
| `target` | yes | `string` | The target table name. See RetentionTargets. | — |
| `maxAgeDays` | no | `integer (int32)` | Rows older than this age are candidates for deletion. If `null`, age-based deletion does not apply (only `MaxRows`, if set, applies). | pattern `^-?(?:0\\|[1-9]\d*)$` |
| `maxRows` | no | `integer (int64)` | The maximum number of rows to keep in the target table. The oldest rows over the limit are deleted. If `null`, volume-based deletion does not apply (only `MaxAgeDays`, if set, applies). | pattern `^-?(?:0\\|[1-9]\d*)$` |
| `archive` | no | `boolean` | Whether to archive with `IArchiveSink` before deleting. If no sink is registered, no row is deleted even if this field is `true`. | — |
| `enabled` | no | `boolean` | Whether the policy is enabled. | — |
| `createdAt` | yes | `string (date-time)` | The creation time (UTC). | — |
| `updatedAt` | yes | `string (date-time)` | The last-updated time (UTC). | — |
