Skip to main content

Event envelope

Every request sent to your webhook has the following top-level structure:

Common message fields

All payloads share the same fields in the message object, regardless of content type:

Content types

The field that differentiates the message type is the @class inside each item of contents or attachments, combined with the type field.

TEXT — Text message

The content is in contents[0] with type: "TEXT".

IMAGE — Image with caption

The attachment is in attachments[0] with type: "IMAGE". The caption field is optional.

AUDIO — Voice message

The attachment is in attachments[0] with type: "AUDIO".

VIDEO — Video with caption

The attachment is in attachments[0] with type: "VIDEO". The caption field is optional.

STICKER — Sticker

The attachment is in attachments[0] with type: "STICKER". The URL points to a .webp file.

CONTACT_ARRAY — Contact(s)

The content is in contents[0] with type: "CONTACT_ARRAY". The contacts array can contain multiple contacts, each with first_name, last_name, name, and phones.

INTERACTIVE_BUTTON — Quick reply buttons (text)

The content is in contents[0] with type: "INTERACTIVE_BUTTON". The field internal_information.mediaButtonType indicates the attached media type: "TEXT" when there is no media.

INTERACTIVE_BUTTON — Quick reply buttons (with image)

When internal_information.mediaButtonType is "IMAGE", the thumbnail field contains the URL of the image displayed above the buttons.

INTERACTIVE_ACTION — Action buttons (URL and call)

The content is in contents[0] with type: "INTERACTIVE_ACTION". Each button in buttons has its own type: "URL" or "CALL". The header and footer fields are optional.

Type summary