# Contacts

## Contact Created

**(i) Payload Format:** Contact Created Payload data format and content that Whautomate will transmit to the configured endpoint.

```json
{
  "event": {
    "id": "{{event.id}}",
    "type": "{{event.type}}",
    "timeStamp": "{{event.timeStamp}}",
    "key": "{{event.key}}"
  },
  "contact": {
    "id": "{{contact.id}}",
    "name": "{{contact.name}}",
    "channel": "{{contact.channel}}",
    "phoneNumber": "{{contact.phoneNumber}}",
    "username": "{{contact.username}}",
    "messengerId": "{{contact.messengerId}}",
    "telegramChatId": "{{contact.telegramChatId}}",
    "instagramId": "{{contact.instagramId}}",
    "lastActivity": "{{contact.lastActivity}}",
    "notes": "{{contact.notes}}",
    "stage": "{{contact.stage}}",
    "tags": "{{contact.tags}}",
    "customFields": "{{contact.customFields}}",
    "location": {
      "id": "{{contact.location.id}}",
      "title": "{{contact.location.title}}"
    },
    "createdAt": "{{contact.createdAt}}",
    "updatedAt": "{{contact.updatedAt}}"
  }
}
```

(ii) Contact Created test Payload data 👇

```json
{
  "event": {
    "id": "ecKyX3x8IY",
    "type": "contact_created",
    "timeStamp": "2024-03-17T09:15:00Z",
    "key": "bXcgZ2xXbCU"
  },
  "contact": {
    "id": "bXcgZ2xXbCU",
    "name": "Alice Johnson",
    "channel": "Whatsapp",
    "phoneNumber": "+1234567890",
    "lastActivity": "2024-03-16T15:30:00Z",
    "notes": "Interested in upcoming promotions",
    "stage": "Lead",
    "tags": "["Prospect","Interested"]",
    "customFields": "{"membership":"Silver","preferredLanguage":"English"}",
    "location": {
      "id": "LXhX3x8QYI",
      "title": "Main Office"
    },
    "createdAt": "2024-03-15T10:00:00Z",
    "updatedAt": "2024-03-17T11:45:00Z"
  }
}
```

***

## Contact Tag Added

**(i) Payload Format:** Contact Tag Added Payload data format and content that Whautomate will transmit to the configured endpoint.

```json
{
  "event": {
    "id": "{{event.id}}",
    "type": "{{event.type}}",
    "timeStamp": "{{event.timeStamp}}",
    "key": "{{event.key}}"
  },
  "contact": {
    "id": "{{contact.id}}",
    "name": "{{contact.name}}",
    "channel": "{{contact.channel}}",
    "phoneNumber": "{{contact.phoneNumber}}",
    "username": "{{contact.username}}",
    "messengerId": "{{contact.messengerId}}",
    "telegramChatId": "{{contact.telegramChatId}}",
    "instagramId": "{{contact.instagramId}}",
    "lastActivity": "{{contact.lastActivity}}",
    "notes": "{{contact.notes}}",
    "stage": "{{contact.stage}}",
    "tags": "{{contact.tags}}",
    "addedTags": "{{contact.addedTags}}",
    "customFields": "{{contact.customFields}}",
    "location": {
      "id": "{{contact.location.id}}",
      "title": "{{contact.location.title}}"
    },
    "createdAt": "{{contact.createdAt}}",
    "updatedAt": "{{contact.updatedAt}}"
  }
}
```

(ii) Contact Tag Added test Payload data 👇

```json
{
  "event": {
    "id": "ecKyX3x8IY",
    "type": "contact_tag_added",
    "timeStamp": "2024-03-17T09:15:00Z",
    "key": "bXcgZ2xXbCU"
  },
  "contact": {
    "id": "bXcgZ2xXbCU",
    "name": "Alice Johnson",
    "channel": "Whatsapp",
    "phoneNumber": "+1234567890",
    "lastActivity": "2024-03-16T15:30:00Z",
    "notes": "Interested in upcoming promotions",
    "stage": "Lead",
    "tags": "["Prospect","Interested"]",
    "addedTags": "["Interested"]",
    "customFields": "{"membership":"Silver","preferredLanguage":"English"}",
    "location": {
      "id": "LXhX3x8QYI",
      "title": "Main Office"
    },
    "createdAt": "2024-03-15T10:00:00Z",
    "updatedAt": "2024-03-17T11:45:00Z"
  }
}
```

***

## Contact Tag Removed

**(i) Payload Format:** Contact Tag Removed Payload data format and content that Whautomate will transmit to the configured endpoint.

```json
{
  "event": {
    "id": "{{event.id}}",
    "type": "{{event.type}}",
    "timeStamp": "{{event.timeStamp}}",
    "key": "{{event.key}}"
  },
  "contact": {
    "id": "{{contact.id}}",
    "name": "{{contact.name}}",
    "channel": "{{contact.channel}}",
    "phoneNumber": "{{contact.phoneNumber}}",
    "username": "{{contact.username}}",
    "messengerId": "{{contact.messengerId}}",
    "telegramChatId": "{{contact.telegramChatId}}",
    "instagramId": "{{contact.instagramId}}",
    "lastActivity": "{{contact.lastActivity}}",
    "notes": "{{contact.notes}}",
    "stage": "{{contact.stage}}",
    "tags": "{{contact.tags}}",
    "removedTags": "{{contact.removedTags}}",
    "customFields": "{{contact.customFields}}",
    "location": {
      "id": "{{contact.location.id}}",
      "title": "{{contact.location.title}}"
    },
    "createdAt": "{{contact.createdAt}}",
    "updatedAt": "{{contact.updatedAt}}"
  }
}
```

(ii) Contact Tag Removed test Payload data 👇

```json
{
  "event": {
    "id": "ecKyX3x8IY",
    "type": "contact_tag_removed",
    "timeStamp": "2024-03-17T09:15:00Z",
    "key": "bXcgZ2xXbCU"
  },
  "contact": {
    "id": "bXcgZ2xXbCU",
    "name": "Alice Johnson",
    "channel": "Whatsapp",
    "phoneNumber": "+1234567890",
    "lastActivity": "2024-03-16T15:30:00Z",
    "notes": "Interested in upcoming promotions",
    "stage": "Lead",
    "tags": "["Interested"]",
    "removedTags": "["Prospect"]",
    "customFields": "{"membership":"Silver","preferredLanguage":"English"}",
    "location": {
      "id": "LXhX3x8QYI",
      "title": "Main Office"
    },
    "createdAt": "2024-03-15T10:00:00Z",
    "updatedAt": "2024-03-17T11:45:00Z"
  }
}
```


---

# 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://help.whautomate.com/product-guides/integrations/webhooks/contacts.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.
