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
const iframe = document.querySelector<HTMLIFrameElement>("#yolead-embed");if (!iframe) { throw new Error("YoLead iframe not found");}const yoleadOrigin = new URL(iframe.src).origin;window.addEventListener("message", (messageEvent) => { if ( messageEvent.origin !== yoleadOrigin || messageEvent.source !== iframe.contentWindow ) { return; } const message = messageEvent.data; if ( message?.source !== "yolead-embed" || message?.event !== "chat.created" || typeof message?.data?.chatId !== "string" ) { return; } const chatId = message.data.chatId; // Associate chatId with the corresponding record in your system.});
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"YoLead Developers","description":"Developer documentation for YoLead REST integrations, webhooks, and embedded iframe flows.","colors":{"primary":"#0F766E"},"logo":{"light":"https://mintcdn.com/yolead/DlV_C0EoQy6Sn78H/logo-light.svg?fit=max\u0026auto=format\u0026n=DlV_C0EoQy6Sn78H\u0026q=85\u0026s=4d195c77d9626cba4b994659b670cc0a","dark":"https://mintcdn.com/yolead/DlV_C0EoQy6Sn78H/logo-dark.svg?fit=max\u0026auto=format\u0026n=DlV_C0EoQy6Sn78H\u0026q=85\u0026s=1fbc09fce3afdc3253dcaba5a514b945","href":"/"},"favicon":"https://mintcdn.com/yolead/vPRzPDvxlliB7ABC/favicon.svg?fit=max\u0026auto=format\u0026n=vPRzPDvxlliB7ABC\u0026q=85\u0026s=e1161bed049ae68a506c069d97a1fff7","styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yolead","hasAudioNarration":false,"actualSubdomain":"yolead","customDomains":["docs.yo-lead.com"],"gitSource":{"type":"github","owner":"maximmuzychenka","repo":"yolead-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aed9ce8157ee77d314e9580","clientVersion":"0.0.4138","searchFilterCounts":[{"language":"default","tag":"REST API","count":22},{"language":"default","tag":"Channels","count":9},{"language":"default","tag":"Contacts","count":9},{"language":"default","tag":"Integration basics","count":6},{"language":"default","tag":"Lists","count":6},{"language":"default","tag":"Embed iframe","count":5},{"language":"default","tag":"Webhooks","count":3},{"language":"default","tag":"Tickets","count":3},{"language":"default","tag":"Start","count":2},{"language":"default","tag":"Resources","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"embed/events","slug":"/embed/events","pageMetadata":{"title":"Iframe events","description":"Receive events from the embedded YoLead iframe.","href":"/embed/events"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Receive events from the embedded YoLead iframe.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The YoLead iframe uses `,_jsx(_components.code,{children:`window.postMessage`}),` to notify the parent application about integration events.`]}),`\n`,_jsx(Heading,{level:`2`,id:`chat-created`,children:_jsx(_components.code,{children:`chat.created`})}),`\n`,_jsxs(_components.p,{children:[`After an outbound message is sent successfully, the iframe sends `,_jsx(_components.code,{children:`chat.created`}),` to its parent window before navigating to the resulting chat.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"yolead-embed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat.created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chatId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"64f000000000000000000002\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`data.chatId`}),` to associate the resulting YoLead chat with the record in your CRM or ERP.`]}),`\n`,_jsxs(_components.p,{children:[`For Telegram Account, a send can be accepted while Telegram’s final confirmation is still pending. `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsx(Heading,{level:`2`,id:`listen-for-the-event`,children:`Listen for the event`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` iframe = document.querySelector\u003cHTMLIFrameElement>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"#yolead-embed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (!iframe) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Error(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YoLead iframe not found\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` yoleadOrigin = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` URL(iframe.src).origin;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`window.addEventListener(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (messageEvent) => {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` messageEvent.origin !== yoleadOrigin ||`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` messageEvent.source !== iframe.contentWindow`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message = messageEvent.data;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message?.source !== `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"yolead-embed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ||`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message?.event !== `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat.created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ||`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message?.data?.chatId !== `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chatId = message.data.chatId;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Associate chatId with the corresponding record in your system.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Always validate both `,_jsx(_components.code,{children:`messageEvent.origin`}),` and `,_jsx(_components.code,{children:`messageEvent.source`}),` before using event data. Derive the expected origin from the `,_jsx(_components.code,{children:`iframeUrl`}),` returned by `,_jsx(_components.code,{children:`POST /v1/embed/sessions`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Iframe events","description":"Receive events from the embedded YoLead iframe.","href":"/embed/events"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"chat.created","slug":"chat-created","depth":2,"children":[]},{"title":"Listen for the event","slug":"listen-for-the-event","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"yolead","siteName":"YoLead Developers","title":"Iframe events - YoLead Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T06:11:58.935Z","originalFileLocation":"embed/events.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Receive events from the embedded YoLead iframe.\">\u003cmeta data-mint-head name=\"application-name\" content=\"YoLead Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Iframe events - YoLead Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Receive events from the embedded YoLead iframe.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"YoLead Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.yo-lead.com/embed/events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yolead.mintlify.site/_mintlify/api/og/v2?division=Embed+iframe\u0026amp;title=Iframe+events\u0026amp;description=Receive+events+from+the+embedded+YoLead+iframe.\u0026amp;theme=fa85fa520525103dc48bd7f4\u0026amp;signature=56173a5e95a135d02b3de185a17e5b8f12519dcda278d254512818c60c6d3175\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Iframe events - YoLead Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Receive events from the embedded YoLead iframe.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yolead.mintlify.site/_mintlify/api/og/v2?division=Embed+iframe\u0026amp;title=Iframe+events\u0026amp;description=Receive+events+from+the+embedded+YoLead+iframe.\u0026amp;theme=fa85fa520525103dc48bd7f4\u0026amp;signature=56173a5e95a135d02b3de185a17e5b8f12519dcda278d254512818c60c6d3175\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/yolead/0UVy4KCyj2pnON-R/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"YoLead Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0F766E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.yo-lead.com/embed/events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/embed/events.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.yo-lead.com/#organization\",\"name\":\"YoLead Developers\",\"url\":\"https://docs.yo-lead.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/yolead/DlV_C0EoQy6Sn78H/logo-light.svg?fit=max\u0026auto=format\u0026n=DlV_C0EoQy6Sn78H\u0026q=85\u0026s=4d195c77d9626cba4b994659b670cc0a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.yo-lead.com#website\",\"name\":\"YoLead Developers\",\"url\":\"https://docs.yo-lead.com\",\"publisher\":{\"@id\":\"https://docs.yo-lead.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.yo-lead.com/embed/events#webpage\",\"url\":\"https://docs.yo-lead.com/embed/events\",\"name\":\"Iframe events\",\"description\":\"Receive events from the embedded YoLead iframe.\",\"dateModified\":\"2026-10-28T06:11:58.935Z\",\"isPartOf\":{\"@id\":\"https://docs.yo-lead.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.yo-lead.com/embed/events#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.yo-lead.com/embed/events#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Embed iframe\",\"item\":\"https://docs.yo-lead.com/embed/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Iframe events\",\"item\":\"https://docs.yo-lead.com/embed/events\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.yo-lead.com/embed/events#article\",\"headline\":\"Iframe events\",\"name\":\"Iframe events\",\"description\":\"Receive events from the embedded YoLead iframe.\",\"url\":\"https://docs.yo-lead.com/embed/events\",\"mainEntityOfPage\":{\"@id\":\"https://docs.yo-lead.com/embed/events#webpage\"},\"dateModified\":\"2026-10-28T06:11:58.935Z\",\"publisher\":{\"@id\":\"https://docs.yo-lead.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.yo-lead.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"YoLead Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"YoLead Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/embed/events.md","siteName":"YoLead Developers","nav":{"global":null,"groups":[{"group":"Start","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Integration basics","pages":[{"title":"Chats and tickets","href":"/concepts/chats-and-tickets"},{"title":"Ticket attribution","href":"/concepts/ticket-attribution"},{"title":"Message attachments","href":"/concepts/message-attachments"},{"title":"API keys","href":"/api-keys"},{"title":"Authentication","href":"/authentication"},{"title":"Errors","href":"/errors"}]},{"group":"Channels","pages":[{"title":"Telegram Bot","href":"/concepts/telegram-bot"},{"title":"Telegram Account","href":"/concepts/telegram-account"},{"title":"WhatsApp","href":"/concepts/whatsapp"},{"title":"MAX","href":"/concepts/max"},{"title":"VK","href":"/concepts/vk"},{"title":"Facebook Messenger","href":"/concepts/facebook"},{"title":"Instagram","href":"/concepts/instagram"},{"title":"Avito","href":"/concepts/avito"},{"title":"Email channel","href":"/concepts/email-channel"}]},{"group":"REST API","pages":[{"title":"REST overview","href":"/rest/overview"},{"group":"Employees","pages":[{"title":"List employees","deprecated":null,"version":null,"sidebarTitle":"List employees","openapi":"/openapi/public-api-v1.json get /v1/employees","href":"/api-reference/employees/list-employees"}]},{"group":"Embed","pages":[{"title":"Create embed session","deprecated":null,"version":null,"sidebarTitle":"Create embed session","openapi":"/openapi/public-api-v1.json post /v1/embed/sessions","href":"/api-reference/embed/create-embed-session"}]},{"group":"Tickets","pages":[{"title":"Get ticket history","deprecated":null,"version":null,"sidebarTitle":"Get ticket history","openapi":"/openapi/public-api-v1.json get /v1/tickets/{ticketId}/history","href":"/api-reference/tickets/get-ticket-history"},{"title":"Change ticket status","deprecated":null,"version":null,"sidebarTitle":"Change ticket status","openapi":"/openapi/public-api-v1.json patch /v1/tickets/{ticketId}/status","href":"/api-reference/tickets/change-ticket-status"},{"title":"Change ticket assignee","deprecated":null,"version":null,"sidebarTitle":"Change ticket assignee","openapi":"/openapi/public-api-v1.json patch /v1/tickets/{ticketId}/assignee","href":"/api-reference/tickets/change-ticket-assignee"}]},{"group":"Attachments","pages":[{"title":"Get attachment external URL","deprecated":null,"version":null,"sidebarTitle":"Get attachment external url","openapi":"/openapi/public-api-v1.json get /v1/attachments/{attachmentId}/external-url","href":"/api-reference/attachments/get-attachment-external-url"}]},{"group":"Contacts","pages":[{"title":"List contacts","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json get /v1/contacts","href":"/api-reference/contacts/list-contacts"},{"title":"Create contact","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/contacts","href":"/api-reference/contacts/create-contact"},{"title":"Create contacts in bulk","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/contacts/bulk","href":"/api-reference/contacts/create-contacts-in-bulk"},{"title":"Delete contacts in bulk","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/contacts/bulk-delete","href":"/api-reference/contacts/delete-contacts-in-bulk"},{"title":"Merge contacts","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/contacts/{sourceContactId}/merge","href":"/api-reference/contacts/merge-contacts"},{"title":"Update contact","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json patch /v1/contacts/{contactId}","href":"/api-reference/contacts/update-contact"},{"title":"Delete contact","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json delete /v1/contacts/{contactId}","href":"/api-reference/contacts/delete-contact"},{"title":"Add contact to list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/contacts/{contactId}/lists","href":"/api-reference/contacts/add-contact-to-list"},{"title":"Remove contact from list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json delete /v1/contacts/{contactId}/lists/{listId}","href":"/api-reference/contacts/remove-contact-from-list"}]},{"group":"Lists","pages":[{"title":"List contact lists","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json get /v1/lists","href":"/api-reference/lists/list-contact-lists"},{"title":"Create contact list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/lists","href":"/api-reference/lists/create-contact-list"},{"title":"Get contact list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json get /v1/lists/{listId}","href":"/api-reference/lists/get-contact-list"},{"title":"Update contact list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json patch /v1/lists/{listId}","href":"/api-reference/lists/update-contact-list"},{"title":"Delete contact list","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json delete /v1/lists/{listId}","href":"/api-reference/lists/delete-contact-list"},{"title":"Add contacts to list in bulk","deprecated":null,"version":null,"openapi":"/openapi/public-api-v1.json post /v1/lists/{listId}/contacts","href":"/api-reference/lists/add-contacts-to-list-in-bulk"}]}]},{"group":"Webhooks","pages":[{"title":"Webhooks overview","href":"/webhooks/overview"},{"title":"Verifying signatures","href":"/webhooks/verifying-signatures"},{"title":"Events","href":"/webhooks/events"}]},{"group":"Embed iframe","pages":[{"title":"Embed overview","href":"/embed/overview"},{"title":"Create a session","href":"/embed/create-session"},{"title":"Capabilities","href":"/embed/capabilities"},{"title":"Examples","description":"Common iframe integration patterns.","href":"/embed/examples"},{"title":"Iframe events","href":"/embed/events"}]},{"group":"Resources","pages":[{"title":"Changelog","description":"Public integration changes.","href":"/changelog"}]}]},"basePath":"","title":"Iframe events - YoLead Developers","buildId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","deploymentId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","dynamics":[],"chunks":[]}