# AccountRetention

The AccountRetention type of the TypeScript SDK, which accounts.listRetention and 2 more methods take or answer.

```ts
type AccountRetention = {
  accountId: string
  mailboxes: AccountRetentionRow[]
  minDays: number
  nextCursor?: string
  retentionDays: number | null
  unreadable: string[]
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `accountId` | `string` | Account ULID |
| `mailboxes` | [`AccountRetentionRow[]`](/docs/sdks/typescript/types/account-retention-row) | This page of the account's mailboxes |
| `minDays` | `number` | The platform floor |
| `nextCursor` | `string` | Optional. Cursor for the next page, present only when one exists |
| `retentionDays` | `number` \| `null` | The account default window (null = none) |
| `unreadable` | `string[]` | Mailbox ids on this page whose store could not be read; their rows are omitted rather than reported as zero |

## Used by

| Method | What it does |
| --- | --- |
| [`accounts.listRetention`](/docs/sdks/typescript/accounts/list-retention) | Preview retention across an account's mailboxes |
| [`accounts.setRetention`](/docs/sdks/typescript/accounts/set-retention) | Set account default retention window |
| [`accounts.clearRetention`](/docs/sdks/typescript/accounts/clear-retention) | Clear account default retention window |
