Embed a live chat widget on your website so visitors can start real-time conversations with your support team. Messages become helpdesk tickets automatically.
Add this single line of code before the closing </body> tag on every page where you want the widget to appear:
<script
src="https://api.disqua.com/widget/disqua-widget.js"
data-workspace="YOUR_WORKSPACE_ID"
async>
</script>
Where to find your Workspace ID: Go to Workspace Settings → General in your Disqua console. The Workspace ID is shown at the bottom of the page.
The script is lightweight (~8 KB), loads asynchronously, and uses Shadow DOM so it won't interfere with your page's CSS or JavaScript.
Customise the widget using data-* attributes on the script tag:
| Attribute | Required | Default | Description |
|---|---|---|---|
| data-workspace | Yes | - | Your Disqua Workspace UUID |
| data-color | No | #6366f1 | Accent color (hex). Applied to the bubble, header, and send button. |
| data-position | No | right | right or left — which corner the bubble appears in. |
<script
src="https://api.disqua.com/widget/disqua-widget.js"
data-workspace="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
data-color="#e11d48"
data-position="left"
async>
</script>
live_chat) and a contact record.
localStorage. If they return later, they see their previous conversation and can continue chatting.
These public endpoints are used by the widget script. You can also call them directly for custom integrations.
/widget/config/:workspaceId
Returns widget branding (workspace name, greeting message, accent color).
/widget/sessions
Creates a new chat session (ticket + contact + first message).
Body: { workspaceId, message, name?, email? } → Returns { sessionId, sessionToken }
/widget/sessions/:sessionId/messages
Sends a message from the visitor. Requires X-Widget-Token header.
Body: { message }
/widget/sessions/:sessionId/messages?after=DATETIME
Polls for new messages (used every 3 seconds). Requires X-Widget-Token header.
Returns: { messages: [{ id, sender_type, body_text, created_at }] }
The widget can also be configured from your Disqua console: