Retention settings control how long Audit Log events are stored before being permanently deleted. You can configure the retention period on a per-organization basis.
Get the configured event retention period for the given Organization.
curl https://api.workos.com/organizations/org_01EHZNVPK3SFK441A1RGBFSHRT/audit_logs_retention \ --header "Authorization: Bearer sk_example_123456789"
GET/organizations /:id /audit_logs_retentionParameters Returns objectSet the event retention period for the given Organization.
curl --request PUT \ --url https://api.workos.com/organizations/org_01EHZNVPK3SFK441A1RGBFSHRT/audit_logs_retention \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d '{ "retention_period_in_days": 30 }'
PUT/organizations /:id /audit_logs_retentionParameters Returns object