# Read the retention settings

Source: https://docs.vlayers.ai/reference/conversations/get-retention

`GET /v1/retention` · scope `retention:manage`

Returns how long this workspace keeps its conversations and how the trash works: `mailRetentionDays` (null keeps them), `trashRetentionDays`, `deleteConversationsWithMailbox`, `permanentDeleteAllowed` and `legalHold`, who decided each (`sources`), and one plain sentence per setting (`lines`).

Requires an API key with the `retention:manage` scope.

## Request

cURL:

```bash
curl https://api.vlayers.ai/v1/retention \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.conversations.getRetention();
console.log(summary);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.conversations.get_retention()
print(result.summary)
```

## Response `200`

```json
{
  "settings": {
    "mailRetentionDays": null,
    "trashRetentionDays": 30,
    "deleteConversationsWithMailbox": false,
    "permanentDeleteAllowed": true,
    "legalHold": false
  },
  "sources": {
    "mailRetentionDays": "platform",
    "trashRetentionDays": "platform",
    "deleteConversationsWithMailbox": "platform",
    "permanentDeleteAllowed": "platform",
    "legalHold": "platform"
  },
  "version": 0,
  "lines": [
    "Conversations are kept until someone deletes them.",
    "A deleted conversation can be brought back for 30 days.",
    "Deleting an inbox keeps its conversations.",
    "Conversations may be deleted for good.",
    "No legal hold: nothing is blocking a permanent delete."
  ],
  "summary": "Conversations are kept until someone deletes them; the trash holds for 30 days."
}
```
