Call2Me
Channels

Widgets: embed a chat widget in one line of JavaScript

Drop a single script tag and your voice agent becomes a chat widget on every page — same prompt, same knowledge base, same brand.

Updated May 1, 2026

The widget is the same voice agent talking through a browser instead of a phone. One line of JavaScript embedded on every page.

The 30-second setup

  1. Dashboard → WidgetsNew Widget.
  2. Pick which agent it should use (your existing voice agent is fine).
  3. Customize colors, position, greeting.
  4. Copy the snippet:
<script src="https://api.call2me.app/v1/widgets/widget_xxxxx/embed.js" async></script>
  1. Paste before </body> on your site. Done.

What customization options are available

Set in the dashboard:

  • Position — bottom-right (default), bottom-left, top.
  • Primary color — hex code; used for the bubble and message background.
  • Welcome message — first thing shown when opened.
  • Auto-open — open automatically after N seconds, on scroll past Y%, or only on click.
  • Office hours — show a "we'll get back to you" form during off hours, or run 24/7.
  • Hide on mobile — useful when you want a phone CTA to take precedence.
  • URL include/exclude — restrict to certain pages.

For deeper control, set a config object before the script:

<script>
  window.call2meConfig = {
    primaryColor: '#bf00ff',
    position: 'bottom-right',
    greeting: "Need a reservation? I'll book you in 30 seconds.",
    autoOpen: 5000,
  };
</script>
<script src="https://api.call2me.app/v1/widgets/widget_xxxxx/embed.js" async></script>

How pricing works

$0.01 per message. A message = one exchange (user input + agent reply).

VolumeCost
100 conversations × 6 messages$6
1,000 conversations × 8 messages$80
10,000 conversations × 10 messages$1,000

For most sites, the widget cost is rounding-error in the marketing budget.

Same agent, two channels

The killer feature: the widget reuses your voice agent. Same:

  • System prompt — personality and rules identical.
  • Knowledge base — answers come from the same chunks.
  • Post-call extraction — same structured fields captured (works on chat too).
  • Webhooks — same downstream system gets the data.
  • Multilingual stack — chat works in all 9 languages.

You don't maintain two separate agents.

Asymmetries between voice and chat

  • Chat can show clickable buttons, links, formatted text. Voice can't.
  • Voice hears tone. Chat doesn't.
  • Voice replies are usually 1 sentence (long monologues are bad on the phone). Chat can be longer.

A small conditional in the system prompt covers it:

If the user is on a voice call, keep replies concise (1-2 sentences).
If the user is on chat (no audio context), you can be slightly more
detailed and use bullet points where helpful.

When the widget should NOT replace humans

  • Account-specific issues that need DB lookups your widget isn't wired for.
  • Refunds, credits, escalations — let the agent acknowledge and escalate.
  • Anything legally consequential — escalate to a human.

The escalation path: webhook fires when the agent says it can't help, your team picks up the conversation. Transcript travels with the handoff.

Multiple widgets on one page

Some sites want different agents on different pages — e.g. a sales bot on /pricing and a support bot on /help. You can:

  • Create multiple widgets, each pointing to a different agent.
  • Embed the right one per page based on URL.

API reference

If you'd rather skip the dashboard widget builder and embed via the API directly:

  • GET /v1/widgets/{widget_id}/embed.js — public, returns the runtime JS.
  • GET /v1/widgets/{widget_id}/config — public, widget config.
  • POST /v1/widgets/{widget_id}/chat — public, send a message, get a reply.
  • GET /v1/widgets/{widget_id}/preview — public, preview the widget standalone.

See API Reference for the full schema.

Frequently asked

Q.How do I embed a Call2Me chat widget on my site?

Create a widget in the dashboard, copy the one-line script tag, paste it before </body> on your site. Done.

Q.What does the chat widget cost?

$0.01 per message. Each user message + agent reply pair counts as one message. Conservative estimate: 1,000 conversations of ~8 messages = ~$80.

Q.Can the chat widget use the same agent as my phone calls?

Yes. Widgets reuse the same voice agent — same system prompt, same knowledge base, same post-call data extraction. One personality, two channels.

Q.Can I customize the widget's appearance?

Yes. Set primary color, position (bottom-right/left), welcome message, auto-open delay, and per-page show/hide rules. Fully brandable.

ShareX / TwitterLinkedIn

Ready to ship?

Spin up your first agent in 5 minutes — $10 free credit.

Start free