khai5202
10/28/2025, 9:34 PMAI Evy
10/28/2025, 9:34 PMAI Evy
10/28/2025, 9:34 PM<head> tag :
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="YOUR_RETELL_PUBLIC_KEY"
data-agent-id="YOUR_VOICE_AGENT_ID"
data-from-number="YOUR_RETELL_PHONE_NUMBER"
data-widget-type="callback"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
></script>
The callback widget allows users to enter their phone number, and your voice agent will call them directly .
## Setup for Chat Widget (Text-Based)
If you prefer a text-based chat interface instead, use :
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="YOUR_RETELL_PUBLIC_KEY"
data-agent-id="YOUR_CHAT_AGENT_ID"
data-agent-version="YOUR_AGENT_VERSION"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
></script>
Both widgets are embeddable via a single <script> tag and use the Retell public key system, allowing direct API calls from the frontend with no backend proxy required .AI Evy
10/28/2025, 9:34 PMAI Evy
10/28/2025, 9:34 PMkhai5202
10/28/2025, 9:35 PMAI Evy
10/28/2025, 9:35 PMAI Evy
10/28/2025, 9:36 PMdata-widget-type="callback" attribute in your script tag
So essentially, "callback" means the AI will call back the user on their phone after they request it through your website widget .AI Evy
10/28/2025, 9:36 PMAI Evy
10/28/2025, 9:36 PMkhai5202
10/28/2025, 9:36 PMAI Evy
10/28/2025, 9:36 PMAI Evy
10/28/2025, 9:37 PM<a href="tel:+1234567890">) combined with Retell's inbound calling capabilities [(2) ]() .
When someone calls your Retell number, you can handle it as an inbound call by binding an inbound agent to that number . However, this wouldn't use the pre-built Retell widget - it would be a standard phone call initiated from the user's device to your number.
Would you like more information about setting up inbound calling for your Retell number, or would you prefer to explore the Callback Widget option where the AI calls the user?AI Evy
10/28/2025, 9:37 PMAI Evy
10/28/2025, 9:37 PMkhai5202
11/03/2025, 5:00 PMAI Evy
11/03/2025, 5:00 PMAI Evy
11/03/2025, 5:00 PMAI Evy
11/03/2025, 5:01 PMAI Evy
11/03/2025, 5:01 PM