### ACCOUNT_OFFBOARDED example payload Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example payload for an ACCOUNT_OFFBOARDED event. ```json { "entry": [ { "id": "862475293675413", "time": 1768477204, "changes": [ { "value": { "event": "ACCOUNT_OFFBOARDED" }, "field": "account_update" } ] } ], "object": "whatsapp_business_account" } ``` -------------------------------- ### ACCOUNT_RECONNECTED example payload Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example payload for an ACCOUNT_RECONNECTED event. ```json { "entry": [ { "id": "862475293675413", "time": 1768477203, "changes": [ { "value": { "event": "ACCOUNT_RECONNECTED" }, "field": "account_update" } ] } ], "object": "whatsapp_business_account" } ``` -------------------------------- ### Initiate contacts synchronization response Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example response upon successful initiation of contacts synchronization. ```json { "messaging_product": "whatsapp", "request_id" : "" } ``` -------------------------------- ### Example Payload Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This is an example of a text message payload sent to a WhatsApp user by a business customer using the WhatsApp Business app. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "message_echoes": [ { "from": "15550783881", "to": "16505551234", "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBIyNDlBOEI5QUQ4NDc0N0FCNjMA", "timestamp": "1700255121", "type": "text", "text": { "body": "Here's the info you requested! https://www.meta.com/quest/quest-3/" } } ] }, "field": "smb_message_echoes" } ] } ] } ``` -------------------------------- ### Example Request to Sync Messaging History Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This cURL command demonstrates how to make a POST request to the SMB app data endpoint to initiate a messaging history sync. ```bash curl -X  POST \ 'https://graph.facebook.com///smb_app_data \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d  \ {   "messaging_product": "whatsapp",   "sync_type": "history" } ``` -------------------------------- ### Check onboarding status response Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example response indicating that the business phone number is able to use Cloud API and the WhatsApp Business app. ```json { "is_on_biz_app": true, "platform_type": "CLOUD_API", "id": "106540352242922" } ``` -------------------------------- ### Embedded Signup Configuration Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example of how to set the 'featureType' property to 'whatsapp_business_app_onboarding' in the Embedded Signup implementation for onboarding WhatsApp Business App users. ```json // Launch method and callback registration { "config_id": "", "response_type": "code", "override_default_response_type": true, "extras": { setup: {}, "featureType": "whatsapp_business_app_onboarding", // set to 'whatsapp_business_app_onboarding' "sessionInfoVersion": "3" } } ``` -------------------------------- ### Example payload for media message asset Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example payload for a media message, specifically an image, showing its caption, mime type, sha256 hash, and ID. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "messages": [ { "from": "16505551234", "id": "wamid.QyNUEHBgLMTY0NjcwNDM1OTUVAgARGBI1Rj3NEYxMzAzMzQ5MkEA", "timestamp": "1738796547", "type": "image", "image": { "caption": "Black Prince echeveria", "mime_type": "image/jpeg", "sha256": "3f9d94d399fa61c191bc1d4ca71375a035cd9b9f5b1128e1f0963a415c16b0cc", "id": "24230790383178626" } } ] }, "field": "history" } ] } ] } ``` -------------------------------- ### Example Edit Event Payload Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users A concrete example of a webhook payload for an edit event, demonstrating how a user's message was edited. This includes specific values for phone numbers, IDs, timestamps, and media details. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "contacts": [ { "profile": { "name": "Sheena Nelson" }, "wa_id": "16505551234" } ], "messages": [ { "from": "16505551234", "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=", "timestamp": "1749854575", "type": "edit", "edit": { "original_message_id": "wamid.HBgLMTQxMjU1NTA4MjkVAgASGBQzQUNCNjk5RDUwNUZGMUZEM0VBRAA=", "message": { "context": { "id": "M0" }, "type": "image", "image": { "caption": "Updated image caption", "mime_type": "image/jpeg", "sha256": "a1b2c3d4e5f6...", "id": "1234567890", "url": "https://media.example.com/updated-image.jpg" } } } } ] }, "field": "messages" } ] } ] } ``` -------------------------------- ### Example Revoke Message Webhook Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users An example of a revoke message webhook payload with actual values, illustrating a user-initiated message deletion. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "contacts": [ { "profile": { "name": "Sheena Nelson" }, "wa_id": "16505551234" } ], "messages": [ { "from": "16505551234", "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=", "timestamp": "1749854575", "type": "revoke", "revoke": { "original_message_id": "wamid.HBgLMTQxMjU1NTA4MjkVAgASGBQzQUNCNjk5RDUwNUZGMUZEM0VBRAA=" } } ] }, "field": "messages" } ] } ] } ``` -------------------------------- ### Example payload — chat history sharing declined Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users An example of a JSON payload indicating that chat history sync is turned off by the business. ```json { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "history": [ { "errors": [ { "code": 2593109, "title": "History sync is turned off by the business from the WhatsApp Business App", "message": "History sync is turned off by the business from the WhatsApp Business App", "error_data": { "details": "History sharing is turned off by the business" } } ] } ] } ``` -------------------------------- ### Initiate contacts synchronization request Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example cURL request to initiate the synchronization of a business customer's contacts information using the SMB App Data API. ```curl curl -X POST \ 'https://graph.facebook.com///smb_app_data \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "sync_type": "smb_app_state_sync" }' ``` -------------------------------- ### Check onboarding status request Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example cURL request to check if a customer's business phone number is registered for Cloud API and WhatsApp Business app use. ```curl curl 'https://graph.facebook.com/v25.0/106540352242922?fields=is_on_biz_app,platform_type' \ -H 'Authorization: Bearer EAAJB...' ``` -------------------------------- ### Example payload — chat history sharing approved Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example payload for two message threads: one with a text and video message, and another with a text message. It illustrates how chat history is shared and approved, noting that media message content is described in a separate webhook. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "history": [ { "metadata": { "phase": 0, "chunk_order": 1, "progress": 55 }, "threads": [ { "id": "16505551234", "messages": [ { "from": "15550783881", "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBIyNDlBOEI5QUQ4NDc0N0FCNjMA", "timestamp": "1739230955", "type": "text", "text": { "body": "Here's the info you requested! https://www.meta.com/quest/quest-3/" }, "history_context": { "status": "READ" } }, { "from": "15550783881", "id": "wamid.QyNUEHBgLMTY0NjcwNDM1OTUVAgARGBI1Rj3NEYxMzAzMzQ5MkEA", "timestamp": "1739230970", "type": "media_placeholder", "history_context": { "status": "PLAYED" } }, { "from": "16505551234", "id": "wamid.N0FCNjMAHBgLMTY0NjcwNDM1OTUVAgARGBIyNDlBOEI5QUQ4NDc0", "timestamp": "1739230970", "type": "text", "text": { "body": "Thanks!" }, "history_context": { "status": "READ" } } ] }, { "id": "12125557890", "messages": [ { "from": "15550783881", "id": "wamid.BIyNDlBOEI5N0FCNjMAHBgLMTY0NjcwNDM1OTUVAgARGQUQ4NDc0", "timestamp": "1739230970", "type": "text", "text": { "body": "Thanks for your order! As a thank you, use code THANKS30 to get 30% of your next order." }, "history_context": { "status": "DELIVERED" } } ] } ] } ] }, "field": "history" } ] } ] } ``` -------------------------------- ### Chat History Sharing Payload Syntax Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example JSON payload structure for chat history sharing webhooks. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "history": [ { "metadata": { "phase": , "chunk_order": , "progress": }, "threads": [ /* First chat history thread object */ { "id": "", "messages": [ /* First message object in thread */ { "from": "", "to": "", // only included if SMB message echo "id": "", "timestamp": ", "type": "", "": { }, "history_context": { "status": "" } }, /* Additional message objects in thread would follow, if any */ ] }, /* Additional chat history thread objects would follow, if any */ ] } ] }, "field": "history" } ] } ] } ``` -------------------------------- ### Example Response for Successful Sync Request Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON payload indicates that the request to sync messaging history has been successfully accepted by the API. It does not confirm if the business actually shared their history. ```json {   "messaging_product": "whatsapp",   "request_id" : "" } ``` -------------------------------- ### PARTNER_REMOVED event payload Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Example payload for a PARTNER_REMOVED event, indicating a WhatsApp Business Account has been disconnected. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "time": 1739212624, "changes": [ { "value": { "phone_number": "15550783881", "event": "PARTNER_REMOVED", "disconnection_info": { "reason": "PRIMARY_INACTIVITY", "initiated_by": "SYSTEM" } }, "field": "account_update" } ] } ] } ``` -------------------------------- ### Payload syntax for smb_app_state_sync Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON payload describes synchronization events for WhatsApp contacts within a business customer's WhatsApp Business app. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "state_sync": [ { "type": "contact", "contact": { "full_name": "", "first_name": "", "phone_number": "" }, "action": "", "metadata": { "timestamp": "" } }, * Additional contacts would follow, if any * ] }, "field": "smb_app_state_sync" } ] } ] } ``` -------------------------------- ### Session event payload for FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON object represents the session event payload when a business customer successfully completes the Embedded Signup flow. ```json { "data": { "waba_id": "" }, "type": "WA_EMBEDDED_SIGNUP", "event": "FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING", "version": 3 } ``` -------------------------------- ### Send a template message Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/overview This Python code snippet demonstrates how to send a template message using the WhatsApp Business Platform API. ```Python import requests url = "https://graph.facebook.com///messages" headers = { "Authorization": "Bearer ", "Content-Type": "application/json", } data = { "messaging_product": "whatsapp", "to": "", "type": "template", "template": { "name": "hello_world", "language": {"code": "en_US"}, } } response = requests.post(url, headers=headers, json=data, timeout=30) print(response.json()) ``` -------------------------------- ### Payload Syntax Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON structure represents the payload received when a business app user interacts with WhatsApp. It includes details about the WhatsApp Business Account, message echoes, and metadata. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "message_echoes": [ { "from": "", "to": "", "id": "", "timestamp": "", "type": "", "": { "" } } ] }, "field": "smb_message_echoes" } ] } ] } ``` -------------------------------- ### Payload Syntax for Edit Event Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON structure represents the payload received when a WhatsApp user edits a previously sent message. It includes details about the business account, the event entry, and the specific message edit details. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "contacts": [ { "profile": { "name": "" }, "wa_id": "" } ], "messages": [ { "from": "", "id": "", "timestamp": "", "type": "edit", "edit": { "original_message_id": "", "message": { "context": { "id": "" }, "type": "image", "image": { "caption": "", "mime_type": "", "sha256": "", "id": "", "url": "" } } } } ] }, "field": "messages" } ] } ] } ``` -------------------------------- ### ACCOUNT_RECONNECTED payload syntax Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Syntax for the ACCOUNT_RECONNECTED webhook payload, indicating a WhatsApp Business Account has reconnected. ```json { "entry": [ { "id": "", "time": "", "changes": [ { "value": { "event": "ACCOUNT_RECONNECTED" }, "field": "account_update" } ] } ], "object": "whatsapp_business_account" } ``` -------------------------------- ### ACCOUNT_OFFBOARDED payload syntax Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users Syntax for the ACCOUNT_OFFBOARDED webhook payload, used when a business offboards its WhatsApp Business app phone number. ```json { "entry": [ { "id": "", "time": "", "changes": [ { "value": { "event": "ACCOUNT_OFFBOARDED" }, "field": "account_update" } ] } ], "object": "whatsapp_business_account" } ``` -------------------------------- ### Account Update Webhook Payload Syntax Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON structure defines the syntax for the account_update webhook, which is triggered by changes to a WhatsApp Business Account (WABA), such as phone number changes or status updates. It includes optional disconnection_info for PARTNER_REMOVED events. ```json {   "object": "whatsapp_business_account",   "entry": [     {       "id": "",       "time": ,       "changes": [         {           "value": {               "phone_number": "",               "event": "",               "disconnection_info": {  // only included for PARTNER_REMOVED events                 "reason": "",                 "initiated_by": ""               }            },           "field": "account_update"         }       ]     }   ] } ``` -------------------------------- ### Payload syntax — chat history sharing declined Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON payload indicates that chat history sync is turned off by the business from the WhatsApp Business App. ```json { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "history": [ { "errors": [ { "code": 2593109, "title": "History sync is turned off by the business from the WhatsApp Business App", "message": "History sync is turned off by the business from the WhatsApp Business App", "error_data": { "details": "History sharing is turned off by the business" } } ] } ] } ``` -------------------------------- ### Revoke Message Webhook Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/embedded-signup/onboarding-business-app-users This JSON object represents a webhook payload for a revoke message event, indicating a user has deleted a message. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "", "phone_number_id": "" }, "contacts": [ { "profile": { "name": "" }, "wa_id": "" } ], "messages": [ { "from": "", "id": "", "timestamp": "", "type": "revoke", "revoke": { "original_message_id": "" } } ] }, "field": "messages" } ] } ] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.