---
title: "PUT /app-instances/{appInstanceArn}/retention-settings"
method: PUT
path: "/app-instances/{appInstanceArn}/retention-settings"
---

# PUT /app-instances/{appInstanceArn}/retention-settings

`PUT /app-instances/{appInstanceArn}/retention-settings`

Sets the amount of time in days that a given <code>AppInstance</code> retains data.

## Path parameters

- `appInstanceArn` string, required

## Request body

- object
  - `AppInstanceRetentionSettings` object, required — The details of the data-retention settings for an <code>AppInstance</code>.
    - `ChannelRetentionSettings` object — The length of time in days to retain the messages in a channel.
      - `RetentionDays` integer — The time in days to retain the messages in a channel.

## Response `200`

Success

- PutAppInstanceRetentionSettingsResponse
  - `AppInstanceRetentionSettings` object — The time in days to retain data. Data type: number.
    - `ChannelRetentionSettings` object — The length of time in days to retain the messages in a channel.
      - `RetentionDays` integer — The time in days to retain the messages in a channel.
  - `InitiateDeletionTimestamp` string, date-time — The time at which the API deletes data.

## Other responses

- `480` — BadRequestException
- `481` — ForbiddenException
- `482` — ThrottledClientException
- `483` — UnauthorizedClientException
- `484` — ServiceUnavailableException
- `485` — ServiceFailureException

---

[API](https://skmtc.net/aws/apis/chime-sdk-identity.md) · [All operations](https://skmtc.net/aws/apis/chime-sdk-identity/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/chime-sdk-identity/versions/5ac0320cd9af/schema)
