> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit retention

> Set how long a stream's data is kept.

```http theme={null}
PUT /api/v1/streams/{id}/settings
```

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT http://localhost:5080/api/v1/streams/$STREAM_ID/settings \
    -H "authorization: Bearer $MS_JWT" \
    -H 'content-type: application/json' \
    -d '{"retention_days": 30}'
  ```
</RequestExample>

Set `retention_days` to `null` to inherit the deployment default. Explicit values must be from 1 to
3650 days. This operation requires `streams.configure`.
