Embeddable Chatbot Widget
A reusable chatbot widget that can be embedded into any website with a single <script> tag. The blue button in the bottom-right corner is the live widget running on this page.
How to embed
Add the following snippet to the <body> of any webpage:
<script src="https://your-widget-domain.com/widget.js" data-widget-id="YOUR_WIDGET_ID" ></script>
Optional attributes
| Attribute | Values | Default |
|---|---|---|
| data-widget-id | Any valid widget ID | required |
| data-position | bottom-right | bottom-left | bottom-right |
API Reference
POST /api/chat/message
Send a user message and receive a bot reply.
// Request body
{
"widgetId": "string", // required
"sessionId": "string", // optional
"message": "string" // required, max 2000 chars
}
// Response
{
"reply": "string",
"sessionId": "string",
"messageId": "string",
"timestamp": 1234567890
}GET /api/widget/config?widgetId=xxx
Retrieve the public configuration for a widget ID.
Phase Roadmap
✓Phase 1 — Standalone widget with mock responses
○Phase 2 — Widget ID management + domain allowlisting
○Phase 3 — Authentication & secure API key handling
○Phase 4 — LLM / AI integration
○Phase 5 — CMS integration & conversation history