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 areferral object with ad attribution data.
| Field | Description |
|---|---|
ctwaClid | Click ID generated by Meta for the click-to-WhatsApp ad. |
sourceUrl | URL of the Facebook ad or post. |
sourceId | ID of the ad. |
sourceType | "ad" or "post". |
headline | Title of the ad. |
body | Description text of the ad. |
mediaType | "image" or "video". |
imageUrl | Raw URL of the ad image. |
videoUrl | Raw URL of the ad video. |
thumbnailUrl | Raw URL of the video thumbnail. |
Media attachment
When a customer sends an image, video, audio, or document, the payload includes anattachments array. Only one attachment is sent per webhook event.
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:
| Type | Supported MIME types |
|---|---|
image | image/jpeg, image/png |
video | video/mp4, video/3gpp(coming soon) |
audio | audio/aac, audio/mp4, audio/mpeg, audio/amr, audio/ogg, audio/ogg; codecs=opus |
document | text/plain, application/pdf, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.*, application/vnd.android.package-archive |
Button response
When a customer taps an interactive button, the payload includes abuttonResponse 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 yourdelivery_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
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.
| Error field | Description |
|---|---|
message | Description of the error. |
type | High-level error category (e.g. ERROR_TYPE_INVALID_REQUEST). |
code | Specific error code (e.g. ERROR_CODE_MESSAGE_TEMPLATE_INPUT_INVALID). |
userTitle | Short human-readable error title. |
userMessage | Actionable guidance for resolving the error. |
cntTraceId | Connectly trace ID β provide this to support when reporting delivery failures. |
