---
title: "Create a retention policy"
method: POST
path: "/v1/retention-policies"
tags: ["retention-policies"]
---

# Create a retention policy

`POST /v1/retention-policies`

## Request body

- RetentionPolicyCreate
  - `name` string, required
  - `turn_retention_days` integer, nullable
  - `session_retention_days` integer, nullable
  - `archive_strategy` 'soft_delete' | 'hard_delete'
  - `is_default` boolean

## Response `201`

Successful Response

- SrcConversationSchemasRetentionPolicyResponse
  - `id` string, uuid, required
  - `organization_id` string, uuid, required
  - `name` string, required
  - `turn_retention_days` integer, nullable
  - `session_retention_days` integer, nullable
  - `archive_strategy` 'soft_delete' | 'hard_delete', required
  - `is_default` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/oneloop-hq/apis/feather-api.md) · [All operations](https://skmtc.net/oneloop-hq/apis/feather-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneloop-hq/feather-api/versions/888bdd5c076e/schema)
