> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat expiration

> This method is responsible for sending chat expiration.

## Overview

This method is responsible for sending chat expiration.

***

## Attributes

### Header

<ParamField path="instanceId" type="string" required>
  Your instance ID. Available in the Z-API panel under **Instances**.
</ParamField>

<ParamField path="token" type="string" required>
  Your Z-API instance token.
</ParamField>

### Required

<ParamField body="phone" type="string" required>
  Phone number of the chat you want to modify
</ParamField>

<ParamField body="chatExpiration" type="string" required>
  Chat expiration: `24_HOURS`, `7_DAYS`, `90_DAYS` or `OFF`
</ParamField>

***

## Request Body

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "phone": "554497050785",
  "chatExpiration": "90_DAYS"
}
```

***

## Response

### 200

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "value": true
}
```

### 405

In this case, make sure you are correctly sending the method specification, i.e., check if you sent POST or GET as specified at the beginning of this topic.

### 415

If you receive a 415 error, make sure to add the "Content-Type" of the object you are sending in the request headers, most commonly "application/json".
