Skip to content

Update a data retention category.

PUT
/api/admin/data-retention/categories/{category}
Code sample: Shell / cURL
curl --request PUT \
--url https://auth.example.com/api/admin/data-retention/categories/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "retention_days": 90 }'

Updates the retention period for one supported data retention category in the tenant settings and records an audit log entry. lookup_directory defaults to 180 days, requires 30-3650 days, and commits a typed policy generation with a durable Control projection. Other categories accept 1-3650 days. Shortening a period requires confirm_shortening=true and the current period in expected_current_retention_days; stale or unconfirmed requests fail with 409.

category
required
string

Retention category key such as audit_logs, session_data, tombstones, auth_codes, refresh_tokens, access_tokens, or lookup_directory.

Media type application/json
object
retention_days
required
integer
>= 1 <= 3650
confirm_shortening

Must be true when the requested period is shorter than the effective period.

boolean
expected_current_retention_days

Current effective period observed with the impact estimate.

integer
>= 1 <= 3650
key
additional properties
Example
{
"retention_days": 90
}

Data retention category update response.

Media type application/json
object
category
required
string
retention_days
required
integer
updated_at
required
string format: date-time
key
additional properties
Example generated
{
"category": "example",
"retention_days": 1,
"updated_at": "2026-04-15T12:00:00Z"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}