Create Web Call
Create a new web-based call session with an AI agent.
This endpoint initializes a new web call session that allows direct browser-based communication between a user and an AI agent. Use this for implementing click-to-call or embedded chat interfaces in web applications.
Body
Identifier of the AI agent that will handle this web call
Custom key-value pairs for storing call-specific information
Optional alternative AI agent identifier for special handling scenarios
Dynamic data to be used by the AI agent during this call
Response
Current status of the call: 'registered' for initialized calls, 'ongoing' for active calls, 'ended' for completed calls, 'error' for failed calls
registered
, ongoing
, ended
, error
Unique identifier for the call session, automatically generated as a MongoDB ObjectId
Security token for accessing call-related resources
Identifier of the AI agent handling this call
Duration of the call in seconds
Timestamp when the call was terminated, in UTC
Detailed reason why the web call ended, if applicable
user_ended_call
, agent_ended_call
, call_transferred
, inactivity_timeout
, maximum_duration_exceeded
, concurrent_call_limit_reached
, invalid_payment
, potential_scam_detected
, inbound_webhook_error
, line_busy
, call_failed
, no_answer
, llm_websocket_initialization_error
, llm_websocket_connection_lost
, llm_websocket_runtime_error
, llm_websocket_payload_corruption
, twilio_error
, no_audio_input
, speech_recognition_error
, pia_platform_internal_error
, unknown_error
, user_connection_failure
Timestamp when the call was initiated, in UTC
Indicates this response is for a web-based call
web_call
Chronological list of messages exchanged during the call
Custom key-value pairs storing additional information about the call
Optional identifier for an alternative AI agent handling this call
Dynamic data used by the AI agent during the call
URL to access the recorded audio file of the call