---
title: "Post retention settings"
method: POST
path: "/schema/{table}/retentionsettings"
tags: ["Schema"]
---

# Post retention settings

`POST /schema/{table}/retentionsettings`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/schema/{table}/retentionsettings`
- Auth: API key in header `Authorization`

Create or update retention settings.

## Path parameters

- `table` string, required

## Query parameters

- `account_id` string

## Request body `*/*`

- ModelsRetentionSettings
  - `capacity` integer
  - `created` string
  - `edit_status` string
  - `keep_days` integer
  - `modified` string

## Response `200`

Retention settings

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `capacity` integer
    - `created` string
    - `edit_status` string
    - `keep_days` integer
    - `modified` string
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `201`: Retention settings
- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/schema/:table/retentionsettings/post.md)

---

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