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}/analytics

https://calling.ubiqproject.com/api/v1/campaigns/{campaign_id}/analytics · Auth: API key (full or read-only)

Request

Path parameters

campaign_idstring (UUID)required
The 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_callsinteger
Contacts that have been dialled at least once (not queued, not filtered out).
interaction_endcallpairs
Completed (connected and finished) vs Not completed among those dialled.
intentspairs
How many calls ended with each result read from the transcript, most common first.
promise_to_pay, interestedinteger
Shortcuts: the count for those two results. 0 if your outcomes use other keys.
top_objectionspairs
The six most common objections callers raised, lower-cased.
summaryobject
The 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_msinteger
Typical time the AI took to reply, in milliseconds: the median per call, averaged over calls.
p99_msinteger
The slowest 1% of replies across all calls, in milliseconds.
p50_distributionpairs
Calls grouped by their median reply time.
p99_distributionpairs
Calls grouped by their slowest replies.
latency_bucketspairs
Every reply across all calls, grouped by reply time.
avg_by_sequencepairs
Average 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 found404
No campaign with this ID in your company.
Invalid id400
campaign_id isn't a UUID.