API Reference · Campaigns
Get campaign analytics
Returns the numbers behind the campaign's Analytics tab: how many calls were placed and completed, what callers said (results and objections), and how quickly the AI employee replied.
GET
/campaigns/{campaign_id}/analyticshttps://calling.ubiqproject.com/api/v1/campaigns/{campaign_id}/analytics · Auth: API key (full or read-only)
Request
Path parameters
campaign_idstring (UUID)requiredThe campaign's ID.
Request
curl https://calling.ubiqproject.com/api/v1/campaigns/9b4e6f12-8a3c-4d71-b05e-2f6a8c1d7e93/analytics \
-H "Authorization: Bearer vk_live_YOUR_KEY"Response
Most fields are lists of { "name", "value" } pairs, ready to draw as a chart.
Response · 200
{
"total_calls": 42,
"avg_p50_ms": 820,
"p99_ms": 2310,
"p50_distribution": [
{ "name": "<500ms", "value": 6 },
{ "name": "500-1000ms", "value": 24 },
{ "name": "1000-2000ms", "value": 9 },
{ "name": ">2000ms", "value": 1 }
],
"p99_distribution": [
{ "name": "<1000ms", "value": 3 },
{ "name": "1000-2000ms", "value": 21 },
{ "name": "2000-4000ms", "value": 15 },
{ "name": ">4000ms", "value": 1 }
],
"latency_buckets": [
{ "name": "<500ms", "value": 88 },
{ "name": "500-1000ms", "value": 301 },
{ "name": "1000-2000ms", "value": 97 },
{ "name": ">2000ms", "value": 14 }
],
"avg_by_sequence": [
{ "name": "Turn 1", "value": 940 },
{ "name": "Turn 2", "value": 810 }
],
"interaction_endcall": [
{ "name": "Completed", "value": 36 },
{ "name": "Not completed", "value": 6 }
],
"intents": [
{ "name": "promise_to_pay", "value": 19 },
{ "name": "callback", "value": 8 },
{ "name": "not_interested", "value": 5 }
],
"promise_to_pay": 19,
"interested": 0,
"top_objections": [
{ "name": "salary delayed", "value": 7 },
{ "name": "already paid", "value": 3 }
]
}Response fields
total_callsintegerContacts that have been dialled at least once (not queued, not filtered out).
interaction_endcallpairsCompleted (connected and finished) vs Not completed among those dialled.intentspairsHow many calls ended with each result read from the transcript, most common first.
promise_to_pay, interestedintegerShortcuts: the count for those two results. 0 if your outcomes use other keys.
top_objectionspairsThe six most common objections callers raised, lower-cased.
summaryobjectThe business view shown in the dashboard's Analytics tab, counted the same way as a workflow's analytics:
totals (contacts, dialed, connected, interested, callbacks, promises), funnel, interested / callbacks / promises (contact lists), objections, perDay, talked (picked up and talked 15 s or more), callSeconds (time on the phone), byHour (calls and pickups per hour of day) and timezone.avg_p50_msintegerTypical time the AI took to reply, in milliseconds: the median per call, averaged over calls.
p99_msintegerThe slowest 1% of replies across all calls, in milliseconds.
p50_distributionpairsCalls grouped by their median reply time.
p99_distributionpairsCalls grouped by their slowest replies.
latency_bucketspairsEvery reply across all calls, grouped by reply time.
avg_by_sequencepairsAverage reply time for turn 1, turn 2 … (first 8 turns).
Every count is 0, and every list is empty or all zeros, until calls have been made.
Errors
Responses
Campaign not found404No campaign with this ID in your company.
Invalid id400campaign_id isn't a UUID.