user_preferences webhook referenceThis reference describes trigger events and payload contents for the WhatsApp Business Account user_preferences webhook.
The user_preferences webhook notifies you of changes to a WhatsApp user's marketing message preferences.
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>",
"phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>"
},
"contacts": [
{
"profile": {
"name": "<WHATSAPP_USER_NAME>"
},
"wa_id": "<WHATSAPP_USER_ID>"
}
],
"user_preferences": [
{
"wa_id": "<WHATSAPP_USER_ID>",
"detail": "<PREFERENCE_DESCRIPTION>",
"category": "marketing_messages",
"value": "<PREFERENCE>",
"timestamp": <WEBHOOK_SENT_TIMESTAMP>
}
]
},
"field": "user_preferences"
}
]
}
]
}| Placeholder | Description | Example value |
|---|---|---|
String | Business display phone number. |
|
String | Business phone number ID. |
|
String |
Values can be:
|
|
String | Description of marketing message preference. Values can be:
|
|
Integer | Unix timestamp indicating when the webhook was triggered. |
|
String | WhatsApp Business Account ID. |
|
String | WhatsApp user ID. Note that a WhatsApp user's ID and phone number may not always match. |
|
String | WhatsApp user's name as it appears in their profile in the WhatsApp client. |
|
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "102290129340398",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "15550783881",
"phone_number_id": "106540352242922"
},
"contacts": [
{
"wa_id": "16505551234"
}
],
"user_preferences": [
{
"wa_id": "16505551234",
"detail": "User requested to resume marketing messages",
"category": "marketing_messages",
"value": "resume",
"timestamp": 1731705721
}
]
},
"field": "user_preferences"
}
]
}
]
}