v3

latestOpenAPI 3.1.02026-08-087684214.2 KB
calls

Create Web Call

Create a browser-based web call.

Returns an access token that your frontend passes to the AgentPhone Web SDK (agentphone-web-sdk) to start the call in the browser. The token expires 30 seconds after creation.

Flow:

  1. Validates the agent belongs to your account
  2. Creates a web call and returns an access token
  3. Your client calls webClient.startCall({ accessToken }) to connect
  4. Call lifecycle (transcripts, webhooks) works the same as phone calls
post/v1/calls/web

Request body

agentIdstring required

Agent ID to start the web call with

metadataobject nullable

Optional metadata to attach to the call

variablesobject nullable

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

{"stackTrail":"paths:/v1/calls/web:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}