Learn how to embed the Retell website widget on your site
<script>
tag and uses the Retell public key system, allowing direct API calls from the frontend—no backend proxy required.
The widget supports two modes:
<head>
tag:
data-public-key
- Your Retell public keydata-agent-id
- Your chat agent IDdata-agent-version
- Agent version (if unset, uses latest version)data-title
- Custom chat window titledata-logo-url
- URL of your logo imagedata-color
- Hex color code for widget theme (e.g., “#FFA07A”)data-bot-name
- Bot name for popup messagesdata-popup-message
- Popup message before users open chatdata-show-ai-popup
- Set to “true” to enable popup messagesdata-show-ai-popup-time
- Seconds to delay before showing popup (default: 0)data-auto-open
- Set to “true” to auto-open chat widget on page loaddata-dynamic
- JSON string with dynamic variables for the chat agent<head>
tag:
data-public-key
- Your Retell public keydata-agent-id
- Your voice agent ID (not chat agent)data-widget="callback"
- Enables callback modedata-phone-number
- Your Retell phone number that will make the outbound calldata-title
- Custom widget titledata-color
- Hex color code for widget themedata-countries
- Comma-separated country codes for country selector (e.g., “US,CA,GB”)data-tc
- URL to your terms and conditions page