Skip to main content

GetSurveyStats returns aggregate completion metrics for a survey.

GET 

/api/v1/surveys/:surveyId/stats

Produces counts by response status, overall completion rate, average response duration, and a per-channel breakdown. Optionally scope the stats to a single campaign.

Parameters

  • survey_id: Required, survey ID (> 0).
  • campaign_id: Optional filter, 0 or omitted for all campaigns.

Response Fields

  • total_responses: All responses across statuses.
  • completed, partial, abandoned, expired, declined: Counts per status.
  • completion_rate: completed / total_responses as a float.
  • avg_duration_seconds: Mean of duration_seconds across completed.
  • by_channel: Map of channel_type to response count.

Request

Responses

A successful response.