Skip to main content
GET
/
analytics
/
calls
curl -X GET "https://api.avoca.ai/v1/analytics/calls?start_date=2024-01-01&end_date=2024-01-31&group_by=day" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID"
{
  "data": {
    "period": {
      "start": "2024-01-01",
      "end": "2024-01-31",
      "timezone": "America/Los_Angeles"
    },
    "summary": {
      "total_calls": 1543,
      "answered_calls": 1498,
      "missed_calls": 45,
      "average_duration": 186,
      "booking_rate": 0.42,
      "transfer_rate": 0.08,
      "containment_rate": 0.92
    },
    "call_reasons": [
      {
        "reason": "New service request",
        "count": 645,
        "percentage": 0.42
      },
      {
        "reason": "Reschedule appointment",
        "count": 231,
        "percentage": 0.15
      },
      {
        "reason": "Service inquiry",
        "count": 201,
        "percentage": 0.13
      },
      {
        "reason": "Emergency service",
        "count": 154,
        "percentage": 0.10
      },
      {
        "reason": "Billing question",
        "count": 123,
        "percentage": 0.08
      }
    ],
    "outcomes": {
      "appointment_scheduled": 648,
      "transferred_to_human": 123,
      "information_provided": 412,
      "voicemail": 45,
      "wrong_number": 23
    },
    "time_series": [
      {
        "timestamp": "2024-01-01T00:00:00Z",
        "calls": 42,
        "bookings": 18,
        "average_duration": 172
      },
      {
        "timestamp": "2024-01-02T00:00:00Z",
        "calls": 58,
        "bookings": 26,
        "average_duration": 195
      }
    ],
    "peak_hours": [
      {
        "hour": 9,
        "call_volume": 12.3,
        "answer_rate": 0.98
      },
      {
        "hour": 10,
        "call_volume": 15.7,
        "answer_rate": 0.97
      },
      {
        "hour": 14,
        "call_volume": 14.2,
        "answer_rate": 0.96
      }
    ],
    "customer_sentiment": {
      "positive": 0.68,
      "neutral": 0.28,
      "negative": 0.04
    }
  },
  "meta": {
    "request_id": "req_pqr678",
    "timestamp": "2024-02-01T10:00:00Z"
  }
}
Access comprehensive analytics about your call volume, performance, and outcomes. Data is updated in real-time and can be filtered by various parameters.

Request

start_date
string
required
Start date for analytics period (YYYY-MM-DD)
end_date
string
required
End date for analytics period (YYYY-MM-DD)
group_by
string
default:"day"
Time grouping for data points:
  • hour - Hourly breakdown
  • day - Daily breakdown
  • week - Weekly breakdown
  • month - Monthly breakdown
timezone
string
default:"America/Los_Angeles"
Timezone for date/time calculations (IANA timezone)
call_type
string
Filter by call type:
  • inbound - Incoming calls only
  • outbound - Outgoing calls only
  • all - Both types (default)
assistant_id
string
Filter by specific AI assistant
include_breakdown
boolean
default:"true"
Include detailed breakdowns by hour, day of week, etc.

Response

period
object
Analytics period details
summary
object
Overall metrics summary
call_reasons
array
Breakdown of call reasons
outcomes
object
Call outcome breakdown
time_series
array
Time-based data points
peak_hours
array
Busiest hours of the day
customer_sentiment
object
Aggregate sentiment analysis
curl -X GET "https://api.avoca.ai/v1/analytics/calls?start_date=2024-01-01&end_date=2024-01-31&group_by=day" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID"
{
  "data": {
    "period": {
      "start": "2024-01-01",
      "end": "2024-01-31",
      "timezone": "America/Los_Angeles"
    },
    "summary": {
      "total_calls": 1543,
      "answered_calls": 1498,
      "missed_calls": 45,
      "average_duration": 186,
      "booking_rate": 0.42,
      "transfer_rate": 0.08,
      "containment_rate": 0.92
    },
    "call_reasons": [
      {
        "reason": "New service request",
        "count": 645,
        "percentage": 0.42
      },
      {
        "reason": "Reschedule appointment",
        "count": 231,
        "percentage": 0.15
      },
      {
        "reason": "Service inquiry",
        "count": 201,
        "percentage": 0.13
      },
      {
        "reason": "Emergency service",
        "count": 154,
        "percentage": 0.10
      },
      {
        "reason": "Billing question",
        "count": 123,
        "percentage": 0.08
      }
    ],
    "outcomes": {
      "appointment_scheduled": 648,
      "transferred_to_human": 123,
      "information_provided": 412,
      "voicemail": 45,
      "wrong_number": 23
    },
    "time_series": [
      {
        "timestamp": "2024-01-01T00:00:00Z",
        "calls": 42,
        "bookings": 18,
        "average_duration": 172
      },
      {
        "timestamp": "2024-01-02T00:00:00Z",
        "calls": 58,
        "bookings": 26,
        "average_duration": 195
      }
    ],
    "peak_hours": [
      {
        "hour": 9,
        "call_volume": 12.3,
        "answer_rate": 0.98
      },
      {
        "hour": 10,
        "call_volume": 15.7,
        "answer_rate": 0.97
      },
      {
        "hour": 14,
        "call_volume": 14.2,
        "answer_rate": 0.96
      }
    ],
    "customer_sentiment": {
      "positive": 0.68,
      "neutral": 0.28,
      "negative": 0.04
    }
  },
  "meta": {
    "request_id": "req_pqr678",
    "timestamp": "2024-02-01T10:00:00Z"
  }
}