<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update

# Contacts Update

**Webhook.** Sent to the webhook URL you configure.

Contacts update allows you to receive a webhook when there is a new update
about your WhatsApp contacts (`hook` "contact"). A contact is an end user
WhatsApp number that you are chatting with.

The types of contacts updates you can get are:

- For [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts, when a
  contact is added or changed.
- For coexistence accounts, when a contact is deleted (not sent at the
  moment).
- When a contact asked to stop receiving marketing messages (future update,
  not on production now).
- When a contact asked to keep receiving marketing messages (future update,
  not on production now).
- When a contact accepted your WhatsApp API to call them using WhatsApp Calls
  (future update, not on production now).

Contacts updates are turned on by default.

**Settings:**

| Setting | Value |
| --- | --- |
| URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) |
| Method | JSON via POST |

**With every contacts update, you will get some of the following:**

```json
{
  "status": "OK",
  "hook": "contact",
  "type": "coexistence",
  "to": "972771234567",
  "contact": "972501234567",
  "timestamp": "1789900000",
  "coexistence": "add",
  "contact_name": "Dana Cohen"
}
```

### Response explained

| Parameter | Description / Example |
| --- | --- |
| `status` | "OK" always. |
| `hook` | "contact" always, for contact webhooks. |
| `type` | Contact webhook type. Values: for a coexistence contact update: "coexistence"; for marketing requests: "marketing" (future feature); for calls requests: "calls" (future feature). |
| `to` | Your WhatsApp account. |
| `contact` | The end user WhatsApp number. |
| `timestamp` | The timestamp of the information (Unix time, in seconds, as a string). |
| `coexistence` | Relevant for "coexistence" type only. This will show "add" if a new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed. This will show "remove" if the WhatsApp Business app removed a phone from the contact list (not sent at the moment). |
| `marketing` | Relevant for "marketing" type only. This will show "remove" if a contact asked to stop getting marketing messages. This will show "add" if the contact asked to resume getting marketing messages. (This is a future feature.) |
| `calls` | Relevant for "calls" type only. This will show "add" if a contact allows your business to call them over WhatsApp. This will show "remove" if the contact no longer allows your business to call them over WhatsApp. (This is a future feature.) |
| `contact_name` | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | "OK" always. One of: `OK`. |
| `hook` | string | Yes | "contact" always, for contact webhooks. Always `contact`. |
| `type` | string | Yes | Contact webhook type. One of: `coexistence` — Coexistence contact update; `marketing` — Marketing requests (this is a future feature); `calls` — Calls requests (this is a future feature). Example: `coexistence`. |
| `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. |
| `contact` | string | Yes | The end user WhatsApp number. Example: `972501234567`. |
| `timestamp` | string | Yes | The timestamp of the information (Unix time, in seconds, as a string). Example: `1789900000`. |
| `coexistence` | string | No | Relevant for "coexistence" type only. One of: `add` — A new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed; `remove` — The WhatsApp Business app removed a phone from the contact list (not sent at the moment). Example: `add`. |
| `marketing` | string | No | Relevant for "marketing" type only (this is a future feature). One of: `add` — The contact asked to resume getting marketing messages; `remove` — The contact asked to stop getting marketing messages. |
| `calls` | string | No | Relevant for "calls" type only (this is a future feature). One of: `add` — The contact allows your business to call them over WhatsApp; `remove` — The contact no longer allows your business to call them over WhatsApp. |
| `contact_name` | string | No | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. Example: `Dana Cohen`. |

### Example: Contact saved (coexistence)

A contact was saved or changed in the WhatsApp Business app on the phone.

```json
{
  "status": "OK",
  "hook": "contact",
  "type": "coexistence",
  "to": "972771234567",
  "contact": "972501234567",
  "timestamp": "1789900000",
  "coexistence": "add",
  "contact_name": "Dana Cohen"
}
```

## Responses

### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored.

### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again.
