{"id":"8478fc32-a423-4224-a050-78ea9ada1cba","task":"Create and manage outbound call campaigns via the Five9 Agent and Supervisor REST API with real-time WebSocket event streaming","domain":"app.five9.com/dev","steps":["Authenticate via POST to the Five9 REST API session endpoint with agent credentials to receive a session cookie and metadata URL for the correct data center host","Use the returned metadata base URL (not a hardcoded host) to POST to /agents/login to start an agent session and retrieve the domainId","Subscribe to real-time events by opening a WebSocket to /events and sending a subscription message for data sources such as AGENT_STATE, ACD_STATUS, and CALL_LOG","Initiate an outbound preview call by POSTing to /calls/make_preview_call with the campaign name, record ID, and ANI","Listen on the WebSocket for CALL_LOG events confirming call disposition and outcome codes","POST to /agents/logout to cleanly close the session when the campaign batch is complete"],"gotchas":["The correct API base URL must be discovered dynamically from the login metadata response — Five9 routes accounts to different data center hosts and hardcoding a URL will break for accounts on different nodes","WebSocket connections expire after periods of inactivity; the client must send periodic keep-alive pings or the event stream will silently disconnect without error","TranscriptStream (real-time speech-to-text) is a separate REST-based addition from Five9 Fusion and requires a different credential scope than the standard agent/supervisor API"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/8478fc32-a423-4224-a050-78ea9ada1cba"}