Widgets
There is no public REST endpoint for website widgets; you add a widget to a site with its embed snippet, configure it in the web app, and reach the leads and chats it captures through MCP tools and workflows.
There is no public REST endpoint for website widgets. You create and configure widgets in the web app, and put one on a website with its embed snippet. The endpoints the widget script calls (its configuration, chat sessions, messages, ratings and bookings) exist only for that script. They are keyed to the widget and change with it, so don’t call them yourself.
Add a widget to a site
Copy the snippet from the widget’s Publish dialog in the web app and paste it before the closing </body> tag:
<!-- Zoie Widget -->
<script
src="https://us.zoie.ai/widget-bundle.js"
data-widget-id="<your widget id>"
defer>
</script>
The script loads the widget’s current settings and AI agent every time the page loads, so changes you save in Zoie appear without touching the snippet. The widget only runs on the domains in its Allowed Domains list, or anywhere if the list is empty. For install options and script attributes, see Website widget and Configuration.
What you can do
| Task | Use | Reference |
|---|---|---|
| Put chat on a website | The embed snippet | Website widget |
| Change appearance, greeting, agent or allowed domains | The widget editor in the web app | Widget configuration |
| Find the leads a widget captured | MCP search_leads and get_lead. Leads from widget chats have the lead type Web_Lead. | Leads |
| Read a visitor’s chat | MCP get_conversation_by_lead, with record_type: "Webchat" to show only widget chats | Conversations |
| Send widget leads to your own systems | A workflow with the New Lead Added trigger and a Send webhook action | Leads |
| See views, conversations, ratings and live visitors | The widget’s analytics in the web app | Widget analytics |
There are no MCP tools for creating or configuring widgets, or for widget analytics.
Related
- Publishing and installing the widget
- Embeds overview
- Forms — the public API behind embedded forms