# How to Track Chat Labels via Webhook

The simplest and most efficient way is to enable the **`chats.patch`** webhook event.\
This webhook notifies you whenever there's a change to a chat — including when a label is added, changed, or removed.

> The `chats.patch` payload contains the current label assigned to the chat, so you can always stay updated without making additional API calls.

This is especially useful if you want to keep track of labels **without querying the HTTP API manually**.\
Using the webhook is lighter, real-time, and fully automated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/receiving/webhooks/incoming-webhooks-format/chats/how-to-track-chat-labels-via-webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
