---
title: "Set File Retention"
method: PUT
path: "/api/agents/{agent_id}/file-retention"
tags: ["agents"]
---

# Set File Retention

`PUT /api/agents/{agent_id}/file-retention`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agents/{agent_id}/file-retention`
- Auth: none declared

Set the effective identity's default file-retention policy.

Setting a retention preference implies the agent should have memory, so the
home folder is provisioned on demand if it does not yet exist.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- FileRetentionUpdate
  - `policy` 'ask' | 'chat' | 'relationship' | 'never', required

## Response `200`

Successful Response

- FileRetentionResponse
  - `policy` 'ask' | 'chat' | 'relationship' | 'never', required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
