Skip to main content
POST
Connect a browser call (data plane)
The browser data plane, not the secret-key API: the mint’s connection.web_call_url, where the browser posts its SDP offer for a session minted with protocol: "offer" by POST /calls with "type": "web". @goyappr/client makes this call for you; call it yourself only if you build the peer connection without the SDK. It is authorized by the session token as x-yappr-web-token (a shared link’s page sends x-share-token, the dashboard its own sign-in) - never your secret key, so the browser calls it directly.

One offer per token

The token is single-use: the first offer spends it, and the call it starts is the session’s call_id - the one the mint already answered with. Fetch the ICE servers first with TURN Credentials, which does not spend it. After the answer, trickle candidates to ice_candidate_url with pc_id, and DELETE that URL with pc_id to hang up. An agent whose mint answered protocol: "call_request" is a workflow agent, with or without steps; a one-shot offer starts no workflow run, so the call would run without its tools. Its offer is refused with 409 workflow_preparation_required before the token is spent: create the call with Create Browser Call Request using the same token instead.

Refusals

Every refusal is the one Error body, {error, code}. Branch on code.

Headers

x-yappr-web-token
string

The session token (wcs_…) from POST /calls {"type":"web"}.

Body

application/json
sdp
string
required

The browser's SDP offer.

type
enum<string>
required
Available options:
offer

Response

The call is live. Complete the WebRTC connection with this answer, and send ICE candidates to ice_candidate_url.

call_id
string<uuid>
required
sdp
string
required
type
enum<string>
required
Available options:
answer
pc_id
string
required
agent_name
string
ice_candidate_url
string<uri>