API reference
The website bubble
The one-line snippet, its options, what it puts on the page, and the headers that make it work.
The website bubble is a chat launcher for any page, added with one script tag and no key.
<script src="https://YOUR-TOLDO/widget.js" data-assistant="your-assistant-abc123" async></script>
Paste it just before </body>. Copy the exact line from the assistant’s Places tab: it comes
with the right origin and the right assistant already in it.
Options
| Attribute | Required | Default | What it does |
|---|---|---|---|
data-assistant |
yes | — | The assistant’s share slug. Without it the script does nothing at all |
data-color |
no | #4f46e5 |
The launcher button’s background. Any CSS colour |
async |
no | — | Recommended. Nothing on the page waits for the script |
That is the whole surface. There is no configuration object, no window.Toldo API and no
callbacks — the script is deliberately tiny, because it runs on someone else’s website.
<script
src="https://YOUR-TOLDO/widget.js"
data-assistant="bakery-9fj2kd"
data-color="#2349f5"
async
></script>
What it puts on the page
- A round button, 56 × 56, fixed 20px from the bottom-right corner, at a very high
z-index. - On the first click, an iframe of
/embed/<slug>, above the button, sizedmin(400px, 100vw − 24px)bymin(620px, 100vh − 110px).
The frame is created on first open, so a visitor who never opens the chat never downloads it. It is then hidden and shown rather than destroyed, so a conversation survives being closed and reopened on the same page.
Everything the chat does lives inside that iframe. None of Toldo’s CSS or JavaScript can collide with your page’s, and none of yours can reach into the chat.
Serving
widget.js is served with Access-Control-Allow-Origin: * and cached for five minutes, so it
loads from any site and picks up changes quickly.
Framing is allowed only for /embed/*. Every other page — the landing page, the product, the
share page — is served with frame-ancestors 'none', so Toldo cannot be put inside someone
else’s frame.
When to use the API instead
Use the bubble when you want a chat window on a web page. Use the messages API when the conversation is happening somewhere you control the interface: your own chat UI, a help desk, a form handler, a scheduled job. The bubble needs no key precisely because it exposes nothing a visitor could not do by opening the share link.
Next: Custom actions.