Survey score distributions
/v1/protected/surveys/{surveyId}/score-distributionsScore histograms for rating questions over a time range, for a survey owned by the team the secret key belongs to. Matches the score breakdown on the survey Insights tab. questionIds is a repeatable query param (?questionIds=a&questionIds=b). timeRange accepts all-time, last-7-days, last-30-days, quarter values like q1-2026 (current or previous 4 quarters), or a custom range like custom_2026-01-01_2026-01-31. Returns current histograms plus previousQuarter for comparison (null when unavailable). Server-to-server only — authenticate with a secret key sent as Authorization: Bearer cfti_sk_....
Authorization
BearerAuth Your team's secret key (cfti_sk_...), sent as a bearer token. Keep it server-side — never expose it in client code.
In: header
Path Parameters
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/protected/surveys/123/score-distributions?questionIds=string&timeRange=last-7-days"{ "data": { "current": { "property1": { "property1": 0, "property2": 0 }, "property2": { "property1": 0, "property2": 0 } }, "previousQuarter": { "property1": { "property1": 0, "property2": 0 }, "property2": { "property1": 0, "property2": 0 } } }}Was this page helpful?