All three paths create a real voice session and can consume credits. A browser test call does not dial a phone number. A website widget can collect visitor details before connecting if you configure a pre-call form.
How the browser call connects
The short version for a website call is:- Create an active widget for a published voice agent and allow your website’s origin.
- From that website, read
GET https://api.sendora.ai/api/v1/public/widget/{widget_public_id}/configand show its pre-call fields and consent notice. - After the visitor chooses to start, call
POST https://api.sendora.ai/api/v1/public/widget/{widget_public_id}/callswithfields,consent_accepted, andmetadata. Sendora checks the widget, origin, call limits, and billing, then creates the voice session. - The
201response containsjoin_url,call_id, andlead_capture_status. Givejoin_urlto the browser voice client to join the call. The join URL is a connection credential, not a web page to open.
POST /voice-agents/{agent_id}/test-call instead.
Sendora is the control layer: it creates the call and applies your widget settings and billing rules. The browser’s WebRTC audio connects directly to Sendora’s real-time voice service using the returned join_url; Sendora’s API servers do not relay the call audio.
There is no separate Sendora browser SDK today. The generated widget needs no SDK installation from you. For a fully custom browser UI, contact support for the supported browser client package and a working join example.
Before you start
- Create and configure a voice agent. Check its greeting, voice, instructions, knowledge, and tools. See Voice-agent lifecycle.
- Make sure the agent is ready for browser testing. For website visitors, use a published agent and an active widget.
- Make sure the workspace has billing configured and enough credits to start calls.
- Use a browser with microphone access. Host your website over HTTPS (or use
localhostduring development), and allow microphone permission when prompted.
Test an agent in Sendora
This is the fastest way to confirm that WebRTC calling works before adding a widget to your site.- In the Sendora app, open Voice Agents and select your agent.
- Open the agent’s Test panel and select Browser call.
- Prepare the agent for testing if the panel asks you to, then select Start call and confirm the credit notice.
- Allow the browser to use your microphone. Speak to the agent, check its responses, and end the call from the panel.
Start a browser test through the API
For an authenticated integration, create the test session on your server with a Sendora API key:join_url and call_id. Pass join_url to a browser voice client promptly to join the session. Keep your Sendora API key on the server; never put it in browser JavaScript. Creating a session and joining it are separate steps. See Connect a custom browser client below for the client step.
Add a web voice widget to your site
The widget is the simplest production path. It includes the call controls and handles the WebRTC connection for you.- In the Sendora app, open your published voice agent’s Widgets tab and create a widget.
- In the widget editor, configure its appearance, greeting, consent notice, and optional pre-call form.
- Under Distribution & safety, add every website origin where the widget will run, such as
https://www.example.com. An origin is the scheme and host (and port, if used), without a path or trailing slash. Wildcards are not supported. Save the widget and leave it Active. - Copy the widget’s Embed code from the editor and paste it just before
</body>on each page where it should appear. Use the generated code rather than composing a script URL yourself. - Open the page from an allowed origin, allow microphone access, accept the consent notice if shown, and start a call. Confirm that audio works in both directions and that the call ends cleanly.
snippet (the script tag to paste) and widget_public_id. The management request needs an API key; the visitor’s browser does not. For widget configuration and security details, see Voice widgets.
Build a custom browser call interface
Use this path if you need your own buttons or layout instead of the generated widget. A Sendora widget still owns the public browser-call policy: its public ID, allowed origins, consent setting, pre-call fields, call limits, and active state. Create and configure that widget as described above, but use its runtime endpoints from your own browser UI.Call flow
- From an allowed website origin, request
GET /api/v1/public/widget/{widget_public_id}/configto read the visitor-safe configuration. - Show the configured pre-call fields and consent notice. Gather required fields and an affirmative consent choice when
require_consentis true. - When the visitor chooses to start, send
POST /api/v1/public/widget/{widget_public_id}/callswithfields,consent_accepted, andmetadata. - The response supplies
join_url,call_id, andlead_capture_status. Givejoin_urlto a WebRTC browser client to connect audio, then provide an end-call control.
join_url is a short-lived call credential: use it for that call, do not publish it in logs or reuse it for later calls.
Connect a custom browser client
A custom interface joins the session with thejoin_url returned by the call-creation step, using the supported browser voice client. Contact support for the current client package, a complete join example and the session events you can listen to. Keep the Sendora API key on your server and pass only the join_url to the browser.
Troubleshooting
For the full request and response contracts, use the API reference for the browser test call and widget runtime endpoints. For phone calls, use Voice Calls.