Create a call for your own telephony
Create a call session for a saved agent and receive a WebSocket URL to stream audio into.
This is the “bring your own telephony” endpoint: point Twilio, Telnyx or
Plivo at the returned websocketUrl, or connect to it directly from
your own client. It is also what the JavaScript SDK calls under the hood
when you pass an agentId.
Authorizations
API key for authentication
Body
The agent to run this call. Must be ACTIVE.
Which transport the returned websocketUrl is prepared for.
twilio / telnyx / plivo — carrier media streams, G.711 audio.
websocket — your own client; you choose the sample rates and codec.
webrtc — browser transport, normally reached through the SDK.
Any other value returns 400.
twilio, telnyx, plivo, websocket, webrtc Audio parameters. Only read when connectionType is websocket —
telephony transports force G.711 at 8000 Hz regardless of what is sent
here.
Arbitrary values carried on the call record.