# Labels

You can find more details about all parameters and their types in [the WebHook documentation](https://app.swaggerhub.com/apis-docs/HELLO_137/Whapi-Cloud-WhatsApp-API/1.8.5#/WebhookPayload).

Set the specified events in the webhook settings to receive some information about their changes.  We mentioned more about the events here:[Detailed webhook settings](/help-desk/receiving/webhooks/detailed-webhook-settings.md#mode-setting)

### Label created

Use the `labels.post` setting to get this webhook.

```
{
  "labels": [
    {
      "id": "76",
      "name": "Order complete",
      "color": "lightsteelblue"
    }
  ],
  "event": {
    "type": "labels",
    "event": "post"
  },
  "channel_id": "MANTIS-M72HC"
}
```

***

### Label removed

Use the `labels.delete` setting to get this webhook.

```
{
  "labels_removed": [
    "New order"
  ],
  "event": {
    "type": "labels",
    "event": "delete"
  },
  "channel_id": "MANTIS-M72HC"
}
```

***

### Label changed

{% hint style="warning" %}
Currently, if you change a label, the system will trigger the same event as if a new label had been created. Please keep this in mind.\
We will update this page if in the future we can distinguish between new labels and updates to existing labels.
{% endhint %}

***

### Label is assigned to chat

Use the `chats.patch` setting to get this webhook. Note that chats.patch sends notifications putting in the callback information that was there before the entity was updated and after the entity was updated, showing the difference and what has changed. We have described this in more detail here: [Detailed webhook settings](/help-desk/receiving/webhooks/detailed-webhook-settings.md#webhook-events-and-update-types-post-put-patch-delete)

Pay attention to the information that has been updated in the `changes` array.

```
{
  "chats_updates": [
    {
      "before_update": {
        "id": "120363398750933550@g.us",
        "type": "group",
        "timestamp": 1747391325,
        "name": "Jack Smith and his team",
        "not_spam": true,
        "last_message": {
          "id": "EHdEMDU-kmEBq53fm7NK5g-E8JdK1c",
          ..........................
        }
      },
      "after_update": {
        "id": "120363398750933550@g.us",
        "type": "group",
        "timestamp": 1747391325,
        "name": "Jack Smith and his team",
        "not_spam": true,
        "last_message": {
          "id": "EHdEMDU-kmEBq53fm7NK5g-E8JdK1c",
          ..........................
        },
        "labels": [
          {
            "id": "76",
            "name": "New order",
            "color": "gold"
          }
        ]
      },
      "changes": [
        "labels"
      ]
    }
  ],
  "event": {
    "type": "chats",
    "event": "patch"
  },
  "channel_id": "MANTIS-M72HC"
}
```

### Label is removed from chat

```
{
  "chats_updates": [
    {
      "before_update": {
        "id": "120363398750933550@g.us",
        "type": "group",
        "timestamp": 1747391325,
        "name": "Jack Smith and his team",
        "not_spam": true,
        "last_message": {
          "id": "EHdEMDU-kmEBq53fm7NK5g-E8JdK1c",
          ..........................
        },
        "labels": [
          {
            "id": "76",
            "name": "New order",
            "color": "gold"
          }
        ]
      },
      "after_update": {
        "id": "120363398750933550@g.us",
        "type": "group",
        "timestamp": 1747391325,
        "name": "Jack Smith and his team",
        "not_spam": true,
        "last_message": {
          "id": "EHdEMDU-kmEBq53fm7NK5g-E8JdK1c",
          ..........................
        },
        "labels": []
      },
      "changes": [
        "labels"
      ]
    }
  ],
  "event": {
    "type": "chats",
    "event": "patch"
  },
  "channel_id": "MANTIS-M72HC"
}
```

***

### Format

<table data-header-hidden><thead><tr><th width="168"></th><th></th></tr></thead><tbody><tr><td>contact_id*</td><td><p>ContactID <code>string</code><br>pattern: ^([\d]{7,15})?$</p><p>Contact ID</p></td></tr><tr><td>last_seen</td><td><p><code>number</code></p><p>Last seen timestamp</p></td></tr><tr><td>status</td><td><p><code>string</code></p><p>Presence status</p><p>Enum:<br>[ online, offline, typing, recording, pending ]</p></td></tr></tbody></table>


---

# 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/other/labels.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.
