What is a web call?
A web call is a voice session that runs entirely over the internet. Your backend creates the session via API and gets back aserver_url and participant_token — your frontend uses these to connect to the live session.
Use web calls for:
- Testing your agent during development
- Embedded voice widgets in a web app
- Demo environments where you don’t need a real phone number
Create a web call
Your backend calls this endpoint and receives connection tokens. Pass these to your frontend — never your API key.| Field | What it is | What to do with it |
|---|---|---|
id | Unique call ID | Poll with GET /v1/calls/<id> to check status and read transcript after the call |
server_url | WebSocket server address (wss://voice.oneinbox.ai) | Your frontend connects here to join the audio session |
participant_token | Short-lived client token | Pass to your browser SDK — never expose your API key to the frontend |
Passing context with variables
Usevariables to inject per-call context into the agent’s system prompt and first message. Reference them with {{variable_name}} in your system prompt or first_message.
System prompt example:
Monitoring a call
Poll the call status while it’s active:status | Meaning |
|---|---|
initiated | Session created, agent not yet connected |
in_progress | Call is live |
completed | Call ended normally |
failed | Call failed to connect |
Reading results after the call
Stop the call
Send a stop request to end the session and trigger processing. If the agent already ended the call (via an
end_call tool), this is a no-op.Wait 2–3 seconds
Transcript and analysis are written asynchronously after the session closes. A short wait ensures the data is ready before you fetch it.