---
title: "Set File Retention Days"
method: POST
path: "/api/set_file_retention_days"
tags: ["Admin"]
---

# Set File Retention Days

`POST /api/set_file_retention_days`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/set_file_retention_days`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)

Set the file retention policy for the organization.

Uploaded files in chats without active schedules or pinned status
will be automatically deleted after the specified number of days.

Args:
    value: Number of days after which to auto-delete uploaded files.
           Valid values: 7, 30, 90.

## Request body

- BodySetFileRetentionDaysApiSetFileRetentionDaysPost
  - `value` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
