Create web call
POST/calls/web/{agent_id}
Starts a browser-based call with the agent named in the path and returns what the browser needs to join it. No request body.
A fresh LiveKit room is minted with the Inspra voice worker dispatched into it; join with token, room, wsUrl and identity.
An agent on a runtime that does not support web calls returns 422 unprocessable.
Requires
Authorization: Bearer <api_key>. Create a key under Configuration → General → API Keys.Path parameters
- agent_idstringrequiredUUID of the agent to start the web call with.
Response 201 Created
Web call session ready.
- successbooleanrequiredAlways
truewhen the API returned 201. Errors surface as 4xx/5xx with the Error envelope.true - providerstringrequired
inspra - agent_idstringuuidrequiredThe agent the call is with.
- tokenstringrequiredLiveKit access token (JWT). The browser passes this to the LiveKit client to join the room.
- roomstringrequiredUnique LiveKit room name in the form
web-{workspaceId}!{agentId}!{8-hex}. The frontend subscribes to this exact room. - identitystringrequiredLiveKit participant identity for the human caller.
- wsUrlstringrequiredLiveKit WebSocket URL the browser connects to.
Errors
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 404Not FoundResource not found in this workspace.
- 422Unprocessable EntitySemantically invalid (well-formed but unprocessable for this resource).
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.
- 502Bad GatewayUpstream voice provider failure.