Obtain an OAuth 2.0 access token using the Client Credentials grant against the region-specific token endpoint (e.g., https://login.usw2.mypurecloud.com/oauth/token)
POST to https://api.{region}.mypurecloud.com/api/v2/analytics/conversations/details/query with a ConversationQuery body specifying interval, segmentFilters, and metrics (e.g., nHandled, tAbandon)
Page through results using the cursor field returned in the response until all records are retrieved
GET /api/v2/routing/queues to list current queues and identify the target queue ID for membership updates
GET /api/v2/routing/queues/{queueId}/members to review current agent assignments
POST to /api/v2/routing/queues/{queueId}/members with an array of user objects to add agents, or DELETE /api/v2/routing/queues/{queueId}/members/{memberId} to remove them
Known gotchas
Analytics query results are eventually consistent — data for conversations that ended within the last few minutes may be incomplete or missing; use at least a 5-minute trailing window for accuracy
Queue membership changes take effect immediately for routing but may not reflect in real-time supervisor views for up to 60 seconds due to cache propagation
The API base URL is region-specific (e.g., api.usw2.mypurecloud.com for US West 2); using the wrong regional host returns 404 or authentication errors even with a valid token
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