API Reference

Analytics API

Access performance metrics, conversation analytics, and reporting data.

Endpoints

GET/v1/analytics/overview

High-level metrics summary

GET/v1/analytics/conversations

Conversation metrics over time

GET/v1/analytics/agents/:id

Agent-specific performance

GET/v1/analytics/sentiment

Sentiment distribution

Overview Response

GET /v1/analytics/overview?period=30d
{
  "period": {
    "start": "2025-12-12T00:00:00Z",
    "end": "2026-01-12T00:00:00Z"
  },
  "conversations": {
    "total": 4521,
    "resolved": 4102,
    "escalated": 312,
    "active": 107
  },
  "messages": {
    "total": 28450,
    "from_customers": 14225,
    "from_agents": 14225
  },
  "performance": {
    "avg_response_time_ms": 1250,
    "avg_resolution_time_min": 8.5,
    "automation_rate": 0.87,
    "csat_score": 4.6
  },
  "sentiment": {
    "positive": 0.45,
    "neutral": 0.42,
    "negative": 0.13
  }
}

Query Parameters

  • period - Predefined: 24h, 7d, 30d, 90d
  • start - Custom start date (ISO 8601)
  • end - Custom end date (ISO 8601)
  • agent_id - Filter by specific agent
  • channel - Filter by channel
  • granularity - hour, day, week (for time series)

Available Metrics

Volume

  • • Total conversations
  • • Messages per conversation
  • • Peak hours
  • • Channel distribution

Performance

  • • Response time (p50, p95)
  • • Resolution time
  • • Automation rate
  • • Handoff rate

Quality

  • • CSAT scores
  • • Sentiment trends
  • • Resolution rate
  • • Repeat contact rate

Topics

  • • Top intents
  • • Common questions
  • • Unresolved topics
  • • Trending issues

Related