Skip to main content
The YoLead iframe uses window.postMessage to notify the parent application about integration events.

chat.created

After an outbound message is sent successfully, the iframe sends chat.created to its parent window before navigating to the resulting chat.
Use data.chatId to associate the resulting YoLead chat with the record in your CRM or ERP. For Telegram Account, a send can be accepted while Telegram’s final confirmation is still pending. chat.created identifies the resulting chat; it does not confirm delivery to the recipient. Pending-send updates are handled inside the iframe and do not introduce additional parent-window events.

Listen for the event

Always validate both messageEvent.origin and messageEvent.source before using event data. Derive the expected origin from the iframeUrl returned by POST /v1/embed/sessions.