CTRLK

Additional resources

Shared components

WhatsApp inbound messages

|

View as Markdown

When using WhatsApp for two-way communication, inbound messages are delivered to your webhook endpoint in real time. These messages represent user-initiated actions such as replies, media uploads, or button interactions.



Receive inbound messages

To receive inbound messages using the API:

  • Your webhook must be configured and accessible.
  • You must grant permission to the Infobip platform.
  • Use authorization headers to secure your endpoint.

Messages are delivered using the HTTPS POST requests with a JSON payload.



Inbound message types

WhatsApp supports the following inbound message types:

Message typeDescription
TextStandard user-sent messages
Image / Video / Audio Media files sent from the user's device
VoiceRecorded voice notes
DocumentUploaded files (for example, .pdf, .docx, .xlsx)
LocationStatic location pins
ContactvCard-format contact cards
Button replyQuick reply button interaction
List replyList item selected by the user
Order messageOrder interaction related to WhatsApp Payments
Sticker / Other mediaOther media types, such as stickers or unsupported formats

Media can be downloaded or deleted within 7 days using the WhatsApp API.



Manage inbound media

Inbound media files sent by users, such as images, videos, audio, or documents, are stored temporarily and can be managed through the API.

  • Media is stored for up to 7 days.
  • During this time, you can download or delete media as needed.
  • After 7 days, media is deleted automatically and becomes inaccessible.


Quoted messages [#quoted-messages-inbound-messages]

Users can quote a previous message to indicate a reply context.

When a user replies to a specific message, the inbound payload includes a context object. This object contains:

  • id: ID of the quoted message
  • from: the WhatsApp ID of the sender of the quoted message
NOTE

Quoting is only supported for messages sent by your business (outbound messages). Replies to inbound messages or messages older than 4 days may not be resolved.



Referral messages [#referral-inbound-messages]

When a user clicks a Click-to-WhatsApp ad or post on Facebook on Instagram and sends a message, WhatsApp includes referral metadata in the message payload.

This includes:

  • Source type (ad or organic post)
  • Facebook ad ID
  • Ad URL, headline, and body
  • Unique per-click identifier
  • Media info (if applicable)


Product context [#product-question-inbound-messages]

When a user replies to a product or multi-product message, WhatsApp includes product metadata in the inbound message. This helps you identify:

  • Product ID
  • Product name
  • Catalog ID
  • Thumbnail or image data


Mark messages as read [#additional-functionality-inbound-messages]

The mark-as-read feature allows you to programmatically mark an inbound message as acknowledged. This updates the message status in the user's WhatsApp client.

IMPORTANT

This feature is disabled by default. To enable it, contact your account manager or Support.

Once enabled, use the Mark as read API request to mark inbound messages as read.