Skip to main content
GET
/
v1
/
voice
/
campaigns
/
{campaign_id}
/
analytics
Get Campaign Analytics
curl --request GET \
  --url https://api.example.com/v1/voice/campaigns/{campaign_id}/analytics \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "campaign_id": "<string>",
  "total_contacts": 123,
  "total_calls": 123,
  "connected_calls": 123,
  "failed_calls": 123,
  "voicemail_calls": 123,
  "not_called": 123,
  "success_rate": 123,
  "connection_rate": 123,
  "voicemail_rate": 123,
  "completion_rate": 123,
  "sentiment_breakdown": {
    "Positive": 123,
    "Neutral": 123,
    "Negative": 123,
    "Unknown": 123
  },
  "powered_by": "<string>"
}

Description

Returns comprehensive analytics for a voice campaign including call outcomes, sentiment analysis, and success rates.

Authentication

X-API-Key
string
required
Your Teli API key

Path Parameters

campaign_id
string
required
The campaign identifier

Response Fields

success
boolean
Whether the request was successful
campaign_id
string
Campaign identifier
total_contacts
integer
Total contacts in the campaign
total_calls
integer
Unique phone numbers that were called
connected_calls
integer
Calls where person answered (has duration > 0)
failed_calls
integer
Calls that didn’t connect (no answer, busy, etc.)
voicemail_calls
integer
Calls that went to voicemail
not_called
integer
Contacts not yet called
success_rate
number
Percentage of successful calls (connected / total_calls * 100)
connection_rate
number
Percentage of connected calls
voicemail_rate
number
Percentage of voicemail calls
completion_rate
number
Percentage of contacts attempted (total_calls / total_contacts * 100)
sentiment_breakdown
object
Count of calls by detected user sentiment
powered_by
string
Always returns “Teli”

Example Request

cURL
curl -X GET "https://api.teli.ai/v1/voice/campaigns/voice_campaign_abc123/analytics" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

200
{
  "success": true,
  "campaign_id": "voice_campaign_abc123",
  "total_contacts": 100,
  "total_calls": 85,
  "connected_calls": 45,
  "failed_calls": 25,
  "voicemail_calls": 15,
  "not_called": 15,
  "success_rate": 52.9,
  "connection_rate": 52.9,
  "voicemail_rate": 17.6,
  "completion_rate": 85.0,
  "sentiment_breakdown": {
    "Positive": 20,
    "Neutral": 15,
    "Negative": 5,
    "Unknown": 5
  },
  "powered_by": "Teli"
}

Determining Call Outcomes

Instead of a disconnection_reason field, use these fields to determine call outcomes:
OutcomeHow to Detect
Connectedconnected_calls count, or check if call_duration_ms > 0 on individual calls
Voicemailvoicemail_calls count, or check in_voicemail = true on individual calls
Failedfailed_calls count - includes no answer, busy, declined

Notes

  • Analytics are updated in real-time as calls complete
  • Sentiment is analyzed automatically from call transcripts
  • not_called decreases as the campaign progresses