---
title: "Update scoped data retention settings"
method: PATCH
path: "/data_retention_settings/{level}/{id}"
tags: ["data_retention_settings"]
---

# Update scoped data retention settings

`PATCH /data_retention_settings/{level}/{id}`

**Permission required:** edit_data_retention_settings

## Headers

- `X-Fields` string, mask

## Request body

- DataRetentionModelPatch
  - `settings` DataRetentionAtomModel[]
    - `age` integer
    - `how` 'FULL' | 'SOURCE_FILES'
    - `what` 'ALL' | 'DONE'

## Response `200`

Success

- DataRetentionModel
  - `scope` ScopeModel
    - `id` string
    - `level` string
  - `settings` DataRetentionAtomModel[]
    - `age` integer
    - `how` 'FULL' | 'SOURCE_FILES'
    - `what` 'ALL' | 'DONE'

## Other responses

- `403` — Permission insufficient

---

[API](https://skmtc.net/contractp/apis/contract-p.md) · [All operations](https://skmtc.net/contractp/apis/contract-p/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/contractp/contract-p/revisions/8ce53ebd6bd3/schema)
