Skip to main content
POST
/
sessions
/
webrtc
Start a browser WebRTC session
curl --request POST \
  --url https://api.vocobase.com/api/v2/sessions/webrtc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "variables": {
    "callee_name": "Sajal"
  }
}
'
{
  "success": true,
  "data": {
    "session_id": "s1234567-abcd-1234-abcd-123456789012",
    "agent_id": "a1234567-abcd-1234-abcd-123456789012",
    "daily_room_url": "https://voice-session.example.com/abc123",
    "daily_token": "eyJhbGciOi..."
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.vocobase.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json
agent_id
string<uuid>
required

ID of the agent to use for this session.

variables
object

Pre-call variable values. Keys must match variable names declared on the agent (Agent.variables). Substituted into the agent's prompt and greeting via {{name}} placeholders. Echoed in the session.completed webhook for partner-side audit. Missing variables render as empty strings.

Example:
{ "callee_name": "Sajal" }

Response

Session started successfully. Pass daily_room_url and daily_token to your WebRTC client.

success
boolean
data
object