ConfettiDocs

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.

When to use which

EndpointUse when you need…
GET …/statsFunnel metrics — how many people viewed, dismissed, or responded to the survey (all-time)
GET …/score-distributionsA 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:

ValueDescription
all-timeEvery response since the survey was created
last-7-daysRolling 7-day window
last-30-daysRolling 30-day window
q1-2026q4-2026Calendar quarter (current or previous 4 quarters)
custom_2026-01-01_2026-01-31Custom inclusive range (custom_<start>_<end>)

Repeat questionIds for multiple questions:

GET …/score-distributions?questionIds=clx…&questionIds=clx…&timeRange=last-30-days

The 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?

On this page