## Update a chat

`client.chats.update(stringchatID, ChatUpdateParamsbody, RequestOptionsoptions?): ChatUpdateResponse`

**put** `/v3/chats/{chatId}`

Update chat properties such as display name and group chat icon.

Listen for `chat.group_name_updated`, `chat.group_icon_updated`,
`chat.group_name_update_failed`, or `chat.group_icon_update_failed`
webhook events to confirm the outcome.

### Parameters

- `chatID: string`

- `body: ChatUpdateParams`

  - `display_name?: string`

    New display name for the chat (group chats only)

  - `group_chat_icon?: string`

    URL of an image to set as the group chat icon (group chats only)

### Returns

- `ChatUpdateResponse`

  - `chat_id?: string`

  - `status?: string`

### Example

```typescript
import LinqAPIV3 from '@linqapp/sdk';

const client = new LinqAPIV3({
  apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});

const chat = await client.chats.update('550e8400-e29b-41d4-a716-446655440000', {
  display_name: 'Team Discussion',
});

console.log(chat.chat_id);
```

#### Response

```json
{
  "chat_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending"
}
```
