Skip to content
Get started

Get campaign statistics

GET/campaigns/{id}/statistics

Retrieve the "Statistiques" report for a campaign: the four-tile cascade funnel (appelés → eus en ligne → réels échanges → leads chauds), two secondary tiles, the distribution of exchanges by outcome, the list of hot leads, and data-extraction coverage. All counts are over distinct E.164-normalized phone numbers, and the outcome-based categories derive exclusively from calls.outcome. Cascade percentages are null when their denominator is zero.

Path ParametersExpand Collapse
id: string
ReturnsExpand Collapse
statistics: object { campaign, data_extraction, effort, 5 more }
campaign: object { id, agent_name, first_activity_at, 7 more }
id: string
agent_name: string
first_activity_at: unknown
has_activity: boolean
is_cancelled: boolean
last_activity_at: unknown
max_attempts_per_contact: number
name: string
status: "draft" or "running" or "paused" or "completed"
One of the following:
"draft"
"running"
"paused"
"completed"
timezone: string
data_extraction: object { fields, intro }
fields: array of string
intro: string
effort: object { calls_total, inbound_calls, outbound_attempts }
calls_total: number
inbound_calls: number
outbound_attempts: number
funnel: object { called, hot_leads, reached, real_exchanges }
called: object { count, imported_rows }
count: number
imported_rows: number
hot_leads: object { count, pct_of_reached }
count: number
pct_of_reached: number
reached: object { count, inbound, outbound, 2 more }
count: number
inbound: number
outbound: number
overlap: number
pct_of_called: number
real_exchanges: object { count, pct_of_reached }
count: number
pct_of_reached: number
hot_lead_outcomes: array of string
inbound: object { unique_callers }
unique_callers: number
leads: object { hot, warm }
hot: array of object { attempt_id, call_id, direction, 5 more }
attempt_id: string
call_id: string
direction: "inbound" or "outbound"
One of the following:
"inbound"
"outbound"
email: string
last_activity_at: unknown
name: string
phone: string
summary: string
warm: array of object { attempt_id, call_id, direction, 5 more }
attempt_id: string
call_id: string
direction: "inbound" or "outbound"
One of the following:
"inbound"
"outbound"
email: string
last_activity_at: unknown
name: string
phone: string
summary: string
outcome_breakdown: array of object { count, label, outcome }
count: number
label: string
outcome: string

Get campaign statistics

curl https://www.getrevox.com/api/campaigns/$ID/statistics \
    -H "Authorization: Bearer $REVOX_API_KEY"
{
  "statistics": {
    "campaign": {
      "id": "id",
      "agent_name": "agent_name",
      "first_activity_at": {},
      "has_activity": true,
      "is_cancelled": true,
      "last_activity_at": {},
      "max_attempts_per_contact": 0,
      "name": "name",
      "status": "draft",
      "timezone": "timezone"
    },
    "data_extraction": {
      "fields": [
        "string"
      ],
      "intro": "intro"
    },
    "effort": {
      "calls_total": 0,
      "inbound_calls": 0,
      "outbound_attempts": 0
    },
    "funnel": {
      "called": {
        "count": 0,
        "imported_rows": 0
      },
      "hot_leads": {
        "count": 0,
        "pct_of_reached": 0
      },
      "reached": {
        "count": 0,
        "inbound": 0,
        "outbound": 0,
        "overlap": 0,
        "pct_of_called": 0
      },
      "real_exchanges": {
        "count": 0,
        "pct_of_reached": 0
      }
    },
    "hot_lead_outcomes": [
      "string"
    ],
    "inbound": {
      "unique_callers": 0
    },
    "leads": {
      "hot": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ],
      "warm": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ]
    },
    "outcome_breakdown": [
      {
        "count": 0,
        "label": "label",
        "outcome": "outcome"
      }
    ]
  }
}
Returns Examples
{
  "statistics": {
    "campaign": {
      "id": "id",
      "agent_name": "agent_name",
      "first_activity_at": {},
      "has_activity": true,
      "is_cancelled": true,
      "last_activity_at": {},
      "max_attempts_per_contact": 0,
      "name": "name",
      "status": "draft",
      "timezone": "timezone"
    },
    "data_extraction": {
      "fields": [
        "string"
      ],
      "intro": "intro"
    },
    "effort": {
      "calls_total": 0,
      "inbound_calls": 0,
      "outbound_attempts": 0
    },
    "funnel": {
      "called": {
        "count": 0,
        "imported_rows": 0
      },
      "hot_leads": {
        "count": 0,
        "pct_of_reached": 0
      },
      "reached": {
        "count": 0,
        "inbound": 0,
        "outbound": 0,
        "overlap": 0,
        "pct_of_called": 0
      },
      "real_exchanges": {
        "count": 0,
        "pct_of_reached": 0
      }
    },
    "hot_lead_outcomes": [
      "string"
    ],
    "inbound": {
      "unique_callers": 0
    },
    "leads": {
      "hot": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ],
      "warm": [
        {
          "attempt_id": "attempt_id",
          "call_id": "call_id",
          "direction": "inbound",
          "email": "email",
          "last_activity_at": {},
          "name": "name",
          "phone": "phone",
          "summary": "summary"
        }
      ]
    },
    "outcome_breakdown": [
      {
        "count": 0,
        "label": "label",
        "outcome": "outcome"
      }
    ]
  }
}