Data Retention Policies

Update a data retention policy

PATCH
Updates a single data retention policy

Path parameters

idstringRequired
ID of data retention policy to update

Request

This endpoint expects an object.
type
enumRequired
The type of data retention policy on an environment
Allowed values: lastActivitysinceCreated
period
integerRequired
environmentId
stringRequired
Environment ID

Response

This endpoint returns an object
data
object
A data retention policy belonging to an environment

Errors

PATCH
$curl -X PATCH https://api.x.flatfile.com/v1/data-retention-policies/us_drp_YOUR_ID \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "type": "lastActivity",
> "period": 5,
> "environmentId": "us_env_YOUR_ID"
>}'
Response
1{
2 "data": {
3 "createdAt": "2023-11-15T19:31:33.015Z",
4 "environmentId": "us_env_YOUR_ID",
5 "id": "us_drp_YOUR_ID",
6 "period": 5,
7 "type": "lastActivity",
8 "updatedAt": "2023-11-15T19:31:33.015Z"
9 }
10}