Enable the widget
Turn on embed for a bot and copy the snippet onto your site.
The embed widget is off by default for every new bot. Enabling it is two clicks.
Prerequisite#
The bot must be in READY status. If it isn't, train it first.
Steps#
Open the bot's Embed tab
On the bot detail page, switch from General/Source to the Embed tab.
Click Enable Embed Widget
Pegasus generates a widget configuration including a widget token. The Status switches from Inactive → Active.
Copy the snippet
The Embed Code section now shows a single line of HTML. Click Copy snippet.
Paste into your website
Put the snippet inside
<body>on any page where you want the chat bubble. Most sites add it once in a global template.Reload the page
The chat bubble appears in the bottom-right. Click it to test.
What the snippet contains#
The snippet is a <script> tag that loads the Pegasus widget JS, with the widget token included. No other secrets are exposed.
The token is intentionally public — it identifies the bot to the widget runtime. Real protection comes from allowed origins (see Allowed origins).
After enabling#
You can now:
- Rotate the widget token periodically.
- Lock down allowed origins so only your domains can load the widget.
- Disable or delete the widget if you change your mind.
Failures#
If enabling fails, you see: "Failed to enable the embed widget." Retry, or check that the bot's status is still READY. Bots in other statuses can't be widget-enabled.