Skip to content

Set the lookup directory retention.

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 }'

Sets the lookup directory retention (30-3650 days, default 180), committing a typed policy generation with a durable Control projection and settings history, and records an audit log entry. Shortening it requires confirm_shortening=true and the current period in expected_current_retention_days; stale or unconfirmed requests fail with 409. Every other category is set where it is kept: the request fails with 400 retention_not_set_here and names that place in edit.

category
required
string

Retention category; only lookup_directory is set through this API.

Media type application/json
object
retention_days
required
integer
>= 30 <= 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
>= 30 <= 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"
}

The category’s retention is set elsewhere (retention_not_set_here, with edit saying where), or the request is invalid (a standard error).

Media type application/json
Any of:
object
error
required
string
Allowed values: retention_not_set_here
error_description
required
string
category
required
string
edit
required

Where the category is changed; null for an unknown category.

object | null
Example
{
"error": "retention_not_set_here"
}

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"
}