Queue- / agent-level CSAT / NPS scorecards across answered survey responses
Post-conversation survey scorecards: buckets the tenant’s answered CSAT / NPS survey_responses by queue (call_logs.metadata->>‘queue_id’, joined via call_id) or by handled agent (survey_responses.agent_user_id) and returns one scorecard per bucket with responses, satisfaction_pct (top-2-box score >= 4), avg_score, csat_avg_score, and NPS (promoters − detractors over NPS rows). Narrow to one bucket with ?queue_id= / ?agent_user_id=; restrict survey type with ?survey_type=csat|nps; bound the window with ?from= / ?to=. Paginate with ?limit= / &offset=. Registered as a static route so it wins over /:id. Read access: any authenticated role.
Authorizations
Dashboard JWT token from Clerk
Headers
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Response
Standard { data, meta } envelope. Group-by echo, and the per-bucket scorecard rows ordered by response volume.