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
Known 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
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp