When someone starts or continues a chat from a Click-to-WhatsApp, Click-to-Messenger or Click-to-Instagram ad, or from an m.me / ig.me ref link, the Messaging API records where they came from.
Where you’ll find it
The referral object
The same 12 keys appear on every channel. Each key is always present and is null when Meta didn’t send it.
Media URLs are Meta CDN links and expire. Download anything you need to keep. Only plain http(s) links are passed through.
Ad taps with no message
When someone who already has a Messenger or Instagram chat taps an ad, Meta doesn’t send a message. The platform records an inbound message reading Opened the chat from an ad that carries the referral, once per tap, so you still see the visit. It appears in the messages endpoint like any other message.
Requirements
Ad details are only captured while your platform has click-to-message ad triggers and automations turned on for your workspace, and Meta messaging is connected on the Page or Instagram channel. Messages received before that was in place have no referral details.