Create Web Call
Create a browser-based web call.
Returns connection details that your frontend passes to the AgentPhone Web
SDK (agentphone-web-sdk >= 0.2.0) to start the call in the browser.
expiresAt is the access token’s expiry as Unix epoch milliseconds.
id identifies the AgentPhone call; callId identifies the media connection.
Flow:
- Validates the agent belongs to your account
- Creates a web call and returns its connection details
- Your client calls
webClient.startCall({ accessToken, callId, transport, iceServers }) - Call lifecycle (transcripts, webhooks) works the same as phone calls
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Headers
X-Sub-Account-Id
Request
This endpoint expects an object.
agentId
Agent ID to start the web call with
metadata
Optional metadata to attach to the call
variables
Optional per-call dynamic variables. Values are substituted into {{var_name}} placeholders in the agent’s system prompt and begin message at call time. Requires a hosted-mode agent.
Response
Successful Response
Errors
422
Unprocessable Entity Error

