List data retention categories.
curl --request GET \ --url https://auth.example.com/api/admin/data-retention/categories \ --header 'Authorization: Bearer <token>'Returns how long each kind of tenant data is kept, read from what actually decides it (the audit profile, a logging destination or the tenant PII config for audit logs, the Settings API for Check API decisions, diagnostic logs, sessions and tokens, the lookup directory policy, and the fixed retention of deleted users’ tombstones), where an admin changes it, and what removes the data (a scheduled retention task, expiry, or nothing because it is not stored). Answers 503 when any of these cannot be read.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Data retention category list response.
object
object
object
What decides the retention. setting (with category, key and level), session_settings (with keys), audit (with from: delivery_plan, audit_profile or pii_config), lookup_policy, or default (each record may have its own, set when it is made).
object
Where an admin changes it: settings (Settings API category, key and level), session_settings, audit_pii_config, audit_profile, audit_routing_rules, lookup_directory (this API), or none.
object
What removes the data: a scheduled_task (with its state and this tenant’s last run), expiry where it is kept, not_stored, or not_deleted (nothing removes it yet: the lookup directory, whose policy is projected to Control without a purge acting on it, and expired refresh token families, kept until rotated or revoked).
object
When the task last ran for this tenant. A run covers only some tenants (and, for diagnostic logs, one page of objects each; a tenant is recorded once all its objects were scanned), so the task’s own last run says nothing about this one.
object
A limit below the setting that applies instead (the tenant profile’s token lifetime).
object
object
For sessions: an active session can be extended by per_refresh_seconds at a time; absolute_limit_seconds null means nothing bounds how long it may last in all.
object
object
A lifetime fixed in code for this sign-in path (key names the path).
Audit logs only: a copy also goes to an archive (R2). The deletion covers the primary store only; Authrim deletes nothing from the archive (an R2 lifecycle rule set outside Authrim may).
object
Example
{ "categories": [ { "id": "audit_events", "retention": { "unit": "days" }, "source": { "kind": "setting", "level": "tenant", "from": "delivery_plan" }, "edit": { "kind": "settings", "level": "tenant" }, "deletion": { "kind": "scheduled_task", "reason": "lookup_purge_not_available", "tenant_last_run": { "outcome": "cleaned" }, "projection": "current" }, "varies": "by_route", "cap": { "kind": "tenant_profile" }, "archive": { "deletion": "not_deleted" } } ]}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
object
Example generated
{ "error": "example", "message": "example", "error_description": "example"}What decides a retention cannot be read, so the values in effect are unknown.