# chat.closed

A chat was closed

Sent when a chat is closed, in the app or over the API. Use it to stop showing the chat as open in your own tools.

In the app: Chat closed. Plan feature `webhooks.chats`. To subscribe over the API: `chats:write`.

## data

- `contact_id` (string, uuid)
- `by` (nullable object): Who closed the chat: a team member (`type: user`) or an API key (`type: api_key`).
  - `type` (string): Who or what it was: a team member, an API key, the chatbot, the AI, an automation, a broadcast, the WhatsApp Business app or Soosh itself. More values may be added. One of `user`, `api_key`, `bot`, `ai`, `automation`, `broadcast`, `whatsapp_app`, `system`.
  - `id` (nullable string, uuid): The person, key or broadcast. `null` for actors without one, such as the chatbot.
  - `name` (string)

## Example event

```json
{
  "id": "evt_b3132530481f806d2c4c2c325118445f",
  "type": "chat.closed",
  "api_version": "2026-10-14",
  "created_at": "2026-10-14T10:20:00.000Z",
  "workspace_id": "2b7e4c1a-9d3f-4a85-b6e2-5f0c8d1a7e34",
  "data": {
    "contact_id": "4ea0d485-435d-407f-837a-c7d67095f23a",
    "by": {
      "type": "api_key",
      "id": "5e1d2c3b-4a59-4f68-8e7d-6c5b4a392817",
      "name": "Order system"
    }
  }
}
```