Skip to main content
Use whatsapp.smb.history to handle this event at your webhook endpoint.

Triggers

Occurs when WhatsApp Business App message history is synchronized. Subscribe to whatsapp.smb.history when you configure your webhook endpoint. A history event can contain whatsappInboundMessage for an inbound message, whatsappMessage for an outbound message, or only chunk metadata. phase and progress are included when the event comes from a Meta history chunk. Do not require a message object in every history event.

Syntax

YCloud sends an HTTP POST request to your configured webhook URL. The following shape shows one payload variant. Angle-bracket values are placeholders; their types are listed under Parameters. Optional fields and other variants are described below.

Parameters

Validate the YCloud-Signature HTTP header before you process the JSON body. See signature validation.

Event envelope

Event payload

The four common envelope fields are required. Payload fields depend on the event variant. In each object table, Required applies when its parent object is present. Optional fields can be omitted; a sample does not make a field required.

whatsappInboundMessage

whatsappMessage

Example

The following JSON is the body delivered to your receiver. IDs, phone numbers, and other account values are illustrative.
An inbound history message uses whatsappInboundMessage. phase and progress report synchronization of the history chunk.
An outbound history message uses whatsappMessage. Do not route it as an inbound message.
A metadata-only history chunk reports phase and progress without either message object. Do not treat this shape as a message-created or message-echoes payload.
After verifying the signature and durably accepting the event, return a 2xx response. Process slow work asynchronously.
For scenario walkthroughs, see annotated examples.