Stats
Engagement metrics and score distributions for surveys.
The Stats endpoints expose aggregate survey metrics — the same data shown on the Insights tab in the Confetti dashboard.
Survey engagement stats
Total and unique counts for views, dismissals, and responses.
Survey score distributions
Score histograms for rating questions over a time range.
When to use which
| Endpoint | Use when you need… |
|---|---|
GET …/stats | Funnel metrics — how many people viewed, dismissed, or responded to the survey (all-time) |
GET …/score-distributions | A breakdown of rating scores (e.g. CSAT) over a specific time window, with optional quarter-over-quarter comparison |
For individual response records, use
GET …/responses
or list_responses via MCP.
For ad-hoc score breakdowns, prefer MCP reporting. For automated pipelines, see Reporting via the API.
Score distributions: timeRange
The score-distributions endpoint requires questionIds (one or more rating
question IDs from the survey definition) and a timeRange:
| Value | Description |
|---|---|
all-time | Every response since the survey was created |
last-7-days | Rolling 7-day window |
last-30-days | Rolling 30-day window |
q1-2026 … q4-2026 | Calendar quarter (current or previous 4 quarters) |
custom_2026-01-01_2026-01-31 | Custom inclusive range (custom_<start>_<end>) |
Repeat questionIds for multiple questions:
GET …/score-distributions?questionIds=clx…&questionIds=clx…&timeRange=last-30-daysThe response includes current histograms keyed by question ID, and
previousQuarter for comparison (or null when no prior quarter is available).
Each histogram maps score values (as strings) to response counts.
Was this page helpful?