Website widget
Widget options: every data- attribute
The script tag's attributes: widget key, agent id, style, colour, bot name and welcome message, with defaults and limits.
Reference1 min readUpdated 23 October 2026
The widget (widget.js v1.8) is configured entirely by attributes on its script tag. Change an attribute on your site and the next page load uses it; nothing is stored on SentientOne's side except the key's allowed websites.
Attributes
| Attribute | What it sets | In the Deploy tab's code | If left out |
|---|---|---|---|
data-widget-key | The agent's publishable key, pk-so- plus 40 hex characters. Required | The agent's key | Console warning, widget doesn't load |
data-agent-id | The agent's id. Required, and must be the key's own agent | The agent id | Console warning, widget doesn't load |
data-style | bubble (Chat bubble: a small window above a floating button), panel (Side panel: slides in from the right edge) or popup (a centred window over the page) | bubble | bubble |
data-color | The accent colour, any hex value | #2563eb | #7c3aed |
data-bot-name | The name in the window's header. The Deploy tab allows up to 40 characters | The agent's name, or Assistant | AI Assistant |
data-welcome | The first message visitors see. The Deploy tab allows up to 120 characters | Hi, how can I help you today? | Hi! How can I help you today? |
<script src="https://app.sentientone.ai/widget.js" data-widget-key="pk-so-…" data-agent-id="YOUR_AGENT_ID" data-style="bubble" data-color="#2563eb" data-bot-name="Assistant" data-welcome="Hi, how can I help you today?" defer></script>Keep defer (or load the script after your content) so it never holds up your page. The Deploy tab offers six colour presets (blue #2563eb, violet #7c3aed, emerald #059669, orange #ea580c, rose #e11d48, slate #475569) and a custom colour.
What you can't change
- The window is always light; only the accent colour changes.
- Launcher position and size are fixed by the style you pick.
- "Powered by SentientOne.AI" is always shown.
- There's no JavaScript API (no
window.SentientOne) and no per-visitor settings.
data-api-key is refused
Tags that carry data-api-key (a secret key) don't load at all. See Update an old embed.
Related
Still stuck?
Email us with what you tried and any request id. A person replies.