The Conversation Monitoring RPC API provides advanced monitoring operations including on-demand job execution, batch analysis, and real-time monitoring triggers. Use these endpoints for complex monitoring workflows and automated quality assurance.
Base URL: https://your-api-name.mercury.ratiomachina.com Authentication: x-mercury-api-key: YOUR_API_KEY
🚀 Primary RPC Endpoint: Trigger on-demand monitoring jobs for specific conversations, conversation batches, or custom criteria. This endpoint enables real-time quality analysis and automated alerting workflows.
{
"target": {
"type": "conversation_id",
"conversationId": "uuid-conv-456"
},
"options": {
"includeHistory": true,
"historyLimit": 50,
"priority": "high",
"analysisDepth": "detailed"
},
"notifications": {
"onCompletion": true,
"onAlert": true,
"webhookUrl": "https://your-app.com/webhook/monitor-complete"
},
"context": {
"triggeredBy": "manual_qa_review",
"reviewerId": "qa_specialist_123",
"escalationReason": "customer_complaint"
}
}{
"monitorJob": {
"id": "uuid-job-789",
"personaMonitorId": "uuid-monitor-123",
"target": {
"type": "conversation_id",
"conversationId": "uuid-conv-456"
},
"status": "queued",
"priority": "high",
"estimatedCompletion": "2024-01-15T10:32:00Z",
"queuePosition": 2,
"createdAt": "2024-01-15T10:30:00Z"
},
"monitor": {
"id": "uuid-monitor-123",
"name": "Customer Support Quality Monitor",
"monitorType": "sentiment_analysis"
},
"execution": {
"expectedDuration": "30-120 seconds",
"conversationsToAnalyze": 1,
"processingResources": "medium"
}
}Process multiple conversations simultaneously based on flexible criteria. Ideal for periodic quality reviews, campaign analysis, or compliance audits.
{
"target": {
"type": "batch",
"criteria": {
"personaId": "uuid-persona-456",
"dateRange": {
"from": "2024-01-14T00:00:00Z",
"to": "2024-01-15T00:00:00Z"
},
"channel": "email"
}
},
"options": {
"batchSize": 50,
"priority": "normal",
"parallelProcessing": true,
"stopOnFirstAlert": false
},
"filters": {
"minMessageCount": 3,
"excludeResolved": false,
"customerTiers": ["premium", "enterprise"]
}
}{
"target": {
"type": "batch",
"criteria": {
"tags": ["escalated", "billing_inquiry"],
"status": "active",
"lastActivity": {
"within": "24h"
}
}
},
"options": {
"batchSize": 25,
"priority": "high",
"includeMetrics": true
},
"analysis": {
"compareBaseline": true,
"baselinePeriod": "7d",
"generateReport": true
}
}{
"monitorJob": {
"id": "uuid-job-batch-456",
"type": "batch_analysis",
"status": "processing",
"progress": {
"totalConversations": 127,
"processed": 43,
"remaining": 84,
"alertsTriggered": 3
},
"estimatedCompletion": "2024-01-15T10:45:00Z"
},
"batch": {
"criteria": {
"dateRange": {
"from": "2024-01-14T00:00:00Z",
"to": "2024-01-15T00:00:00Z"
},
"channel": "email"
},
"conversationsMatched": 127,
"avgProcessingTime": "2.3s"
},
"alerts": [
{
"conversationId": "uuid-conv-789",
"alertType": "negative_sentiment_threshold",
"severity": "medium",
"triggeredAt": "2024-01-15T10:33:45Z"
}
]
}Set up automated monitoring jobs that trigger based on conversation events, thresholds, or external system signals.
{
"target": {
"type": "trigger_based",
"trigger": {
"event": "conversation_updated",
"conditions": {
"messageCount": {
"greaterThan": 10
},
"duration": {
"greaterThan": "30m"
},
"keywords": ["escalate", "supervisor", "manager"]
}
}
},
"options": {
"immediateExecution": true,
"priority": "critical",
"alertThreshold": "any"
},
"automation": {
"autoEscalate": true,
"escalationTarget": "senior_support_queue",
"notifyManager": true
}
}{
"target": {
"type": "threshold_trigger",
"criteria": {
"personaId": "uuid-persona-123",
"thresholds": {
"sentimentScore": {
"lessThan": -0.7
},
"consecutiveNegative": {
"greaterThan": 3
}
}
}
},
"options": {
"continuousMonitoring": true,
"samplingInterval": "5m",
"cooldownPeriod": "1h"
},
"responses": {
"alertChannel": "slack",
"autoAssignAgent": true,
"priorityEscalation": true
}
}Create recurring monitoring jobs that execute automatically on defined schedules. Perfect for regular quality audits, compliance checks, and performance monitoring.
{
"target": {
"type": "scheduled_batch",
"schedule": {
"frequency": "daily",
"time": "09:00",
"timezone": "America/New_York"
},
"criteria": {
"dateRange": "yesterday",
"allPersonas": true,
"excludeWeekends": false
}
},
"options": {
"batchSize": 100,
"priority": "normal",
"generateReport": true
},
"reporting": {
"emailRecipients": ["qa@company.com"],
"includeMetrics": true,
"dashboardUpdate": true
}
}{
"target": {
"type": "scheduled_batch",
"schedule": {
"frequency": "weekly",
"day": "monday",
"time": "08:00",
"timezone": "UTC"
},
"criteria": {
"dateRange": "last_7_days",
"channels": ["email", "chat"],
"complianceFlags": true
}
},
"options": {
"deepAnalysis": true,
"includeTranscripts": true
},
"compliance": {
"regulations": ["GDPR", "CCPA"],
"auditTrail": true,
"reportGeneration": "detailed"
}
}DELETE /persona-monitors/{id}/jobs/{jobId}Cancel a queued or running monitor job. Jobs that have already completed cannot be cancelled.
POST /persona-monitors/{id}/jobs/{jobId}/pauseTemporarily pause a running batch job. Can be resumed later from the same position.
POST /persona-monitors/{id}/jobs/{jobId}/resumeResume a paused monitor job. Processing continues from where it was paused.
{
"target": {
"type": "multi_monitor",
"monitors": [
"uuid-sentiment-monitor-123",
"uuid-escalation-monitor-456",
"uuid-compliance-monitor-789"
],
"criteria": {
"conversationIds": ["uuid-conv-001", "uuid-conv-002"],
"aggregateResults": true
}
},
"options": {
"parallelExecution": true,
"crossAnalysisCorrelation": true,
"generateInsights": true
},
"output": {
"combinedReport": true,
"individualResults": true,
"correlationMatrix": true
}
}{
"target": {
"type": "comparative_analysis",
"compareGroups": [
{
"name": "pre_training",
"criteria": {
"dateRange": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-14T23:59:59Z"
}
}
},
{
"name": "post_training",
"criteria": {
"dateRange": {
"from": "2024-01-15T00:00:00Z",
"to": "2024-01-29T23:59:59Z"
}
}
}
]
},
"analysis": {
"metrics": ["sentiment", "resolution_time", "satisfaction"],
"statisticalSignificance": true,
"confidenceLevel": 0.95
}
}{
"target": {
"type": "adaptive_monitoring",
"baseMonitorId": "uuid-monitor-123",
"adaptationRules": {
"adjustThresholds": true,
"learningWindow": "7d",
"sensitivityFactor": 0.1
}
},
"conditions": {
"volumeAdjustment": {
"highVolume": {
"threshold": 1000,
"adjustment": "increase_tolerance"
},
"lowVolume": {
"threshold": 50,
"adjustment": "increase_sensitivity"
}
}
},
"learning": {
"falsePositiveReduction": true,
"patternRecognition": true,
"contextualAdaptation": true
}
}{
"target": {
"type": "contextual_monitoring",
"contextFactors": {
"timeOfDay": {
"businessHours": "lenient",
"afterHours": "strict"
},
"customerTier": {
"premium": "enhanced_analysis",
"standard": "basic_analysis"
},
"conversationType": {
"support": "escalation_focused",
"sales": "satisfaction_focused"
}
}
},
"rules": {
"dynamicSeverity": true,
"contextualAlerts": true,
"adaptiveResponse": true
}
}{
"alerting": {
"grouping": {
"enabled": true,
"groupBy": ["persona", "alertType"],
"timeWindow": "15m",
"maxGroupSize": 10
},
"escalation": {
"levels": [
{
"threshold": 3,
"delay": "5m",
"recipients": ["team_lead@company.com"]
},
{
"threshold": 10,
"delay": "15m",
"recipients": ["manager@company.com"]
}
]
},
"suppression": {
"duplicateWindow": "1h",
"maintenanceMode": false
}
}
}{
"routing": {
"rules": [
{
"condition": {
"alertType": "escalation_required",
"severity": "critical"
},
"action": {
"immediate": true,
"channels": ["slack", "sms", "email"],
"recipients": ["oncall_engineer"]
}
},
{
"condition": {
"customerTier": "premium",
"alertType": "satisfaction_low"
},
"action": {
"priority": "high",
"assignTo": "customer_success_team",
"createTicket": true
}
}
],
"fallback": {
"defaultChannel": "email",
"recipient": "general_alerts@company.com"
}
}
}