data varies by event type. The payload is normalized by Zapfy — it does
not change when the underlying engine changes.
Envelope
Event type, in
UPPER_SNAKE. One of the values below.ID of the Zapfy instance that produced the event.
Unique event ID. Use it as an idempotency key (delivery is at-least-once).
Emission time, ISO 8601 (UTC).
Event-specific payload — described below.
Event types
| Event | When it fires |
|---|---|
MESSAGE_RECEIVED | You received a message. |
MESSAGE_SENT | You sent a message. |
MESSAGE_STATUS | A message was delivered, read or failed. |
CONNECTION_UPDATE | Your number connected or disconnected. |
QRCODE_UPDATED | A new QR Code was generated to connect. |
MESSAGE_RECEIVED / MESSAGE_SENT
TEXT · IMAGE · AUDIO · VIDEO · DOCUMENT · STICKER · LOCATION ·
CONTACT · INTERACTIVE.Text content. For media, holds the caption.
Present for media:
{ mimeType, url, filename, caption }.MESSAGE_STATUS
PENDING · SENT · DELIVERED · READ · FAILED.Present on
FAILED: { code, message }.CONNECTION_UPDATE
CONNECTING · CONNECTED · DISCONNECTED.Disconnect reason when
DISCONNECTED (e.g. LOGGED_OUT, BANNED).QRCODE_UPDATED
QR Code as a data URL (base64 PNG) to pair the number.
QR expiration, ISO 8601 (UTC).