---
title: "PUT /channels/{channelArn}/expiration-settings"
method: PUT
path: "/channels/{channelArn}/expiration-settings"
---

# PUT /channels/{channelArn}/expiration-settings

`PUT /channels/{channelArn}/expiration-settings`

Sets the number of days before the channel is automatically deleted.

*   A background process deletes expired channels within 6 hours of expiration. Actual deletion times may vary.
    
*   Expired channels that have not yet been deleted appear as active, and you can update their expiration settings. The system honors the new settings.
    
*   The `x-amz-chime-bearer` request header is mandatory. Use the ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call as the value in the header.

## Path parameters

- `channelArn` string, required

## Headers

- `x-amz-chime-bearer` string

## Request body

- object
  - `ExpirationSettings` object — Settings that control the interval after which a channel is deleted.
    - `ExpirationDays` integer — The period in days after which the system automatically deletes a channel.
    - `ExpirationCriterion` 'CREATED_TIMESTAMP' | 'LAST_MESSAGE_TIMESTAMP' — The conditions that must be met for a channel to expire.

## Response `200`

Success

- PutChannelExpirationSettingsResponse
  - `ChannelArn` string — The channel ARN.
  - `ExpirationSettings` object — Settings that control the interval after which a channel is deleted.
    - `ExpirationDays` integer, required — The period in days after which the system automatically deletes a channel.
    - `ExpirationCriterion` 'CREATED_TIMESTAMP' | 'LAST_MESSAGE_TIMESTAMP', required — The conditions that must be met for a channel to expire.

## Other responses

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

---

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