Skip to content

Web calls

Add web calls to your website and app.

Visitors talk to your Bolna voice agent live in the browser with one click, with no number to dial and nothing to install. The Web Call SDK handles the microphone, the connection and the cleanup.

// npm install @bolna/web-callimport { BolnaWebCall } from "@bolna/web-call";const call = new BolnaWebCall({  sessionUrl: "/api/bolna-session",});call.on("state-change", (state) => render(state));// Start from the click, so the browser allows audiobutton.onclick = () =>  call.start({ userData: { name: "Riya" } });

Bolna web calls let people talk to your voice agent from a web page instead of a phone.

  • What it is

    A live, two-way voice conversation between a browser tab and your Bolna agent, added to your site with the open-source Web Call SDK, @bolna/web-call.

  • Who it is for

    Teams who want visitors, customers or candidates to talk to their agent from a website, help center, web app or a link, without dialling a number.

  • What you need

    A Bolna agent, your API key and one backend route that mints a short-lived call session, so your API key never reaches the browser.

Add a web call to your site in three steps

  1. Step 01

    Install the SDK

    Run npm install @bolna/web-call, or add one script tag from jsDelivr if your page has no bundler.

  2. Step 02

    Add a session route

    Your backend calls Bolna’s session endpoint with your API key and returns the session. Each one is single-use and expires in about 120 seconds.

  3. Step 03

    Start the call on click

    Call call.start() from your button’s click handler. The SDK asks for the microphone, connects the agent and hangs up when the tab closes.

What you can build with web calls

  • Website

    A “Talk to us” button

    Let visitors ask about products, plans or pricing in a voice conversation, straight from your landing page.

  • Support

    Voice support in your app

    Put the agent in your help center or web app, so customers can talk through a problem without leaving the page.

  • Personalised

    Calls that know who is calling

    Pass userData such as a name, order or plan when the call starts, and the agent uses it in its prompt and welcome message.

  • Languages

    Start in the visitor’s language

    Start a multilingual agent in Hindi, English or the language the visitor picked on your site.

  • Your UI

    Buttons, mute and meters

    A call state machine and six events drive your own buttons, a mute toggle and an audio meter from the agent’s volume.

  • Call data

    The same call history and webhooks

    Every web call has an execution ID that matches your Bolna call history and webhooks, just like a phone call.

A phone call or a web call?

Both reach the same Bolna agent. The difference is how the conversation starts.

A Bolna phone call compared with a Bolna web call
A phone callA web call
How it startsThe customer dials a number, or the agent calls themThe visitor clicks a button on your site or app
What you set upA number from Bolna, your telephony provider or a SIP trunkThe Web Call SDK and one backend route
Where it worksAny phoneA browser with a microphone
What the agent knowsThe caller’s number and any user_data you passAnything your page knows, passed as userData
After the callCall history, transcripts and webhooksThe same call history, transcripts and webhooks

Web Call SDK at a glance

Bolna Web Call SDK package, security, audio and events
Details
Package@bolna/web-call on npm, or a script tag from jsDelivr
Starter templatesNext.js and plain HTML with Node
API keyStays on your server. The browser gets a single-use session that expires in about 120 seconds
AudioWebRTC with Opus, echo cancellation on by default, encrypted
Restrictive networksTURN relay included in every session
Eventsstate-change, media-permission, call-start, call-end, error, volume-level
Methodsstart(), stop(), setMuted(), getState(), getRunId()
Read the Web Call SDK reference

Frequently Asked Questions

A web call is a live voice conversation that runs in the browser instead of over a phone line. With Bolna, a visitor clicks a button on your website or app and talks to your voice agent through their microphone.