Skip to main content
This page covers every type of webhook payload Connectly can POST to your endpoint. Currently, only WhatsApp events are supported.

Common fields

callbackData

When you set the optional callbackData field on an outbound message, Connectly echoes it back at the top level of related webhook events:
  • Delivery status events β€” sent, delivered, read, delivery_failed
  • Inbound replies that reference the original message β€” quoted replies, button & list replies, reactions
callbackData is only present when it was set on the original outbound message. Plain-text inbound messages that don’t quote a prior message will not include it.

Business-scoped user IDs (BSUID)

On WhatsApp numbers with BSUID support enabled, the customer identifier carries two extra fields: userId and phoneNumber. For phone-less customers, id holds the BSUID and phoneNumber is "". The customer appears as sender on inbound message webhooks and as recipient on delivery-status webhooks. See BSUID for full details.

Inbound message payloads

Plain text

Message with referral (Click-to-WhatsApp ad)

When a customer messages you directly from a Meta ad, the payload includes a referral object with ad attribution data.

Media attachment

When a customer sends an image, video, audio, or document, the payload includes an attachments array. Only one attachment is sent per webhook event.
The type field indicates the media type. The file is accessible at url β€” when downloading programmatically, read the MIME type from the response Content-Type header. Supported media types and MIME types:

Button response

When a customer taps an interactive button, the payload includes a buttonResponse object and a context object referencing the original message. If you set callbackData on the original outbound message, it is echoed back here.

Delivery status payloads

Delivery status events are sent to your delivery_status topic endpoint. The statusUpdate.id field matches the message ID returned when you originally sent the message β€” use it to correlate events back to outbound messages.

Delivered

The status field progresses through sent β†’ delivered β†’ read. Each transition generates a separate event.

Delivery failed

When delivery fails, status is delivery_failed and the error object provides details including a cntTraceId to share with Connectly support.
Log the cntTraceId from every delivery_failed event. It’s the fastest way to diagnose a delivery failure with Connectly support.
For the full list of error types and codes, see Error codes.