## Leave a group chat

`client.chats.leaveChat(stringchatID, RequestOptionsoptions?): ChatLeaveChatResponse`

**post** `/v3/chats/{chatId}/leave`

Removes your phone number from a group chat. Once you leave, you will no longer receive messages from the group and all interaction endpoints (send message, typing, mark read, etc.) will return 409.

A `participant.removed` webhook will fire once the leave has been processed.

**Supported**

- iMessage group chats with 4 or more active participants (including yourself)

**Not supported**

- DM (1-on-1) chats — use the chat directly to continue the conversation

### Parameters

- `chatID: string`

### Returns

- `ChatLeaveChatResponse`

  - `message?: string`

  - `status?: string`

  - `trace_id?: 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 response = await client.chats.leaveChat('550e8400-e29b-41d4-a716-446655440000');

console.log(response.trace_id);
```

#### Response

```json
{
  "message": "Leave group chat queued",
  "status": "accepted",
  "trace_id": "trace_id"
}
```
