For the exhaustive schema-derived catalog, see all examples.
What it is
Handle WhatsApp Business App history synchronization events.Before you begin
- Create a public HTTPS endpoint in your application.
- Configure a YCloud webhook endpoint for the event types you need.
- Store the endpoint signing secret securely.
- Make event processing idempotent.
How it works
YCloud sends an HTTPPOST request when the event occurs. Verify the signature, durably record the event, return a 2xx response, and process slow work asynchronously.
For events created from a Meta history chunk, YCloud copies the chunk’s phase and progress to the top-level event. Message-bearing chunks include one direction-specific message object. If both threads and errors are empty, YCloud sends one progress-only event without whatsappMessage or whatsappInboundMessage.
Deliveries are at least once and can arrive out of order. Deduplicate by event id; do not use phase and progress as a unique delivery key.
Request
The scenarios below show requests delivered to your webhook URL. Treat the eventid as the delivery identifier and use type to route the payload.
Response
Return a2xx status after accepting the event.
For endpoint setup, signature validation, and retry behavior, see Configure webhooks.
Inbound Text message
In this case, your webhook endpoint received an inbound text message:- Contains plain text that the user sent.
- Contains the mentioned message information in
context. - Other types of messages can refer to whatsappInboundMessage
Request
Response
Acknowledge the delivery after durably accepting the event.Explanation
- Inbound messages are those sent from customers to your business phone numbers.
- The
context(optional) contains the mentioned message information, typically used to reply to a previous message sent by the user or your business.context.fromis the WhatsApp ID (phone number without the ’+’ prefix) of the user who sent the mentioned message.context.idis the original ID of the mentioned message on WhatsApp’s platform, starting withwamid..
Outbound Text message
In this case, your webhook endpoint received an outbound text message sent by a business customer to a WhatsApp user with the WhatsApp Business app or supported companion device:- Contains plain text sent before.
- Contains the mentioned message information in
context. - Other types of messages can refer to WhatsApp Business App Sent Message Sync Webhook Examples
Request
Response
Acknowledge the delivery after durably accepting the event.Explanation
Route the event bytype, deduplicate it by id, and move slow or failure-prone work to an asynchronous processor.

