Skip to main content
All events share the same envelope. What changes is the type and the content of data. To subscribe to a whole group, use a wildcard in the endpoint subscribed_types: message.*, channel.* or template.*.

Message events

data is the full message in its current state.
message.delivered
A message event always carries the full state of the message at that moment. If you miss message.sent but receive message.delivered, you still have sent_at and every field.
On a template send, data.content also carries header_parameter and button_parameters, with the values as you sent them: the media_id of the file, never a URL. Both keys are absent when the template asks for nothing there. In this example, the header file became unavailable before sending:
message.failed
Messages sent from the WhatsApp Business app have no message.accepted, and the history imported when the channel is connected produces no event at all. See Messages sent from the WhatsApp Business app.

Channel events

channel.status_changed

Fired when the status of a channel changes. The most common cases:
  • The channel becomes degraded because of authentication failures with the provider. Act early: a degraded channel needs attention in the dashboard.
  • The channel becomes disabled because your team disabled it, because the customer disconnected the number in the WhatsApp Business app or because the provider removed the account.
  • A disabled channel goes back to active when you re-enable it in the dashboard.
data carries the channel and the transition:
Deleting a disabled channel produces no event. An event recorded before connection_mode existed does not have that field: ignore fields you do not recognize.

Template events

data is the full template in its current state. template.deleted is sent when the removal finishes. A template that never reached the provider, or that is disabled, is removed right away. The others keep deletion_requested: true until the provider confirms the deletion. A template removed because it no longer exists on WhatsApp, found during a sync, and templates deleted along with a channel produce no event. Importing a template that already existed on WhatsApp produces no event. See Imported templates. data carries the variable examples in variables[].example, components.header.example and components.buttons[].example. When there is no example, as on an old or imported template, the key is absent. Do not put real personal data or a real token in an example: it travels in every event of the template.
template.approved
template.category_changed carries the full template in its current state, with the new category in category, plus the previous_category field. Use it to understand why the cost of a send changed.
template.category_changed

New types

New event types can be introduced at any time, with no version notice. Because each endpoint subscribes to an explicit list, a new type only reaches you if it belongs to a wildcard you subscribed to. Always have a default branch that ignores what you do not recognize.