---
title: "How long the organization's audit events are kept."
method: GET
path: "/v1/organizations/current/audit/retention"
tags: ["organizations"]
---

# How long the organization's audit events are kept.

`GET /v1/organizations/current/audit/retention`

## Request

- Base URL: `https://api.50heads.com`
- URL: `https://api.50heads.com/v1/organizations/current/audit/retention`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.50heads.com/authorize`, token URL `https://auth.50heads.com/token`; client credentials, token URL `https://auth.50heads.com/token`, scopes: `audit:read`)

Organization admins only (403 `organization_admin_required`). API keys, connected apps and service accounts with `audit:read` can read and export where the organization has machine identities (otherwise 403 `session_required`); retention and legal holds change only with a person. Events come from the organization's log and its workspaces' logs and never hold secrets, codes or anything that identifies a head. Being introduced: 404 `not_found` until it is on for your organization. Six years until an admin sets a period; never less than one year.

## Response `200`

OK

- OrganizationAuditRetentionResponse
  - `retention` object, required
    - `days` integer, required
    - `isDefault` boolean, required
    - `floorDays` integer, required
    - `defaultDays` integer, required
    - `maxDays` integer, required
    - `setBy` object, nullable, required
      - `id` string, required
      - `name` string, nullable, required
    - `setAt` string, nullable, required

## Other responses

- `401`: No key or token, or it expired or was revoked.
- `403`: The key or token lacks the scope (`insufficient_scope`), or the action is not allowed.
- `429`: Too many requests; wait for Retry-After.

---

[API](https://skmtc.dev/50heads/apis/50heads-api.md) · [All operations](https://skmtc.dev/50heads/apis/50heads-api/llms.txt) · [OpenAPI document](https://skmtc.dev/50heads/apis/50heads-api/revisions/20175e8b00e3?raw)
