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

# Set Chat Retention Days

`POST /api/set_chat_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_chat_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 chat retention policy for the organization.

Chats without active schedules will be automatically deleted after the specified
number of days. Set to 0 to disable auto-deletion (keep chats forever).

Args:
    value: Number of days after which to auto-delete chats without schedules.
           Valid values: 0 (never), 30, 90, 180, 360, 720.

## Request body

- BodySetChatRetentionDaysApiSetChatRetentionDaysPost
  - `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)
