Create web call token (publishable key, browser)
Create a short-lived participant token using a publishable key (oi_pk_…).
This is the endpoint the Web SDK (@oneinbox/web-sdk) calls internally when you use
new OneInbox("oi_pk_…") and oi.start(agentId). You do not need to call this
endpoint directly — the SDK handles it for you.
If you are building a custom browser client without the SDK, call this endpoint from
the browser using your publishable key. Never use a secret key (oi_sk_…) in
front-end code.
Returns a server_url and participant_token — pass these to the Web SDK to connect.
Testing in this playground
The playground sends requests from a server (no Origin header), so origin validation
will block the request if your key has restricted origins.
To test here: go to Dashboard → Settings → Publishable Keys, edit your key, and
clear the allowed origins list (leave it empty). Empty allowed_origins allows all
origins — perfect for development. Re-add your production origins before going live.
Authorizations
Use a publishable key (oi_pk_…) created in the OneInbox dashboard under Settings → Publishable Keys. Safe to embed in front-end code — scoped to web calls only and locked to registered origins.
Body
Request body for web call token creation. Used by the Web SDK when starting a
call with a publishable key. Identical to WebCallRequest but without overrides.
Response
Created
"call_abc123"
"web"
queued, initiated, in_progress, completed, failed Internal room name
"web-2006ff52"
WebSocket server URL (wss://voice.oneinbox.ai). Your frontend connects here using participant_token.
"wss://voice.oneinbox.ai"
"eyJhbGciOiJIUzI1NiJ9..."