# Embed the web call widget on your website

Source: https://aicallstudio.com/developers/embed-the-web-call-widget

One script tag puts a talk-to-us button on your site: where to copy it, the floating and in-page forms, limiting it to your own websites, and what a visitor's call costs.

## Before you start

- An agent or a team that is live. Each one has its own widget, with its own code.
- The Web Call Widget page in your dashboard, where a widget is switched on and its code is copied.

## Steps

1. **Switch the widget on and copy its code**: In your dashboard, open [Web Call Widget](/dashboard/webcall), pick the agent or team, switch its widget on, and copy the code from Install. The code carries the widget's own key, which starts with wc_. It is not an API key: it only starts web calls to that one agent or team.
2. **Paste it into your page**: Paste the script tag before the closing body tag of every page that should have the button. It loads without holding up your page and draws a floating button at the bottom right. The widget runs in a frame of its own, so your page's styles and scripts do not reach it.
3. **Or place it inside the page**: For a call box in the page itself, such as on a contact page, pick Inline on page as the layout on the Web Call Widget page, save, and copy that code: an empty element with the id aicallstudio-webcall where the box should sit, and the script tag with data-inline.
4. **Limit what it can spend**: Under Spending protection, Allowed websites lists the websites that may use the code, one per line; subdomains count too. On any other website no call starts. It stops your code being copied elsewhere, but a determined script can pretend to be your website, so set Daily minutes as well: the most web-call minutes the widget may use in one day. Left empty, calls from the widget stop after 120 minutes in a day.

Max call length ends each call at 2, 3, 5 or 10 minutes, and Visitors at once sets how many people can talk at the same time. Press Save: edits do nothing on your website until you do.
5. **Try it on your own page**: Open your page, press the button and allow the microphone: you are talking to your agent. The call is in Call Logs a moment after it ends. It is a real call, billed by the minute.

## Can my page control the widget from JavaScript?

Not yet. The script gives your page no functions and no events: there is nothing to call to open the widget, and your page is not told when a call starts or ends. The design, the welcome message and the limits are set on the Web Call Widget page, not in the code.

## When are visitors turned away?

Outside the agent's or team's calling hours, visitors are told you are not taking calls and when to try again. When every line is in use, the next visitor is told all lines are busy: web calls share your workspace's lines with phone calls. Once the day's minutes are used, visitors are told to try again tomorrow. No call starts in any of these, and none is billed.

## Costs and what to watch

- Anyone who can open your website can start a call, and every web call is billed by the minute like a phone call.
- Reset key stops the code already on your website at once. Paste the new code after a reset.
- If you list websites under Allowed websites and forget one, the widget stops working there.

## Questions

### How do I add an AI voice call button to my website?

Switch on the web call widget for an agent or team in your dashboard, copy its one-line script tag and paste it into your page. Visitors press the button and talk to your AI agent from their browser, with no phone number to dial and nothing to install.

### Is the widget's key an API key?

No. The key in the embed code starts with wc_ and only starts web calls to its one agent or team. It can be read by anyone who opens your page, which is why Allowed websites and Daily minutes exist.

Every endpoint, field and error: https://aicallstudio.com/docs/api