Contacts Update
Webhook
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 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 |
| Method | JSON via POST |
With every contacts update, you will get some of the following:
{
"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
Your response
- 200
- default
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.
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.