Measure CSAT and response time
Pull customer satisfaction (CSAT) and response time data from the message.com reports API. Render in your own dashboard, ship to Looker / Metabase, or set SLA alerts. The numbers below assume you already have conversations and CSAT ratings flowing.
Pull first-response and resolution time
curl -X GET 'https://app.message.com/api/v1/reports/tickets/response-times?range=30d' \
-H 'Authorization: Bearer YOUR_WORKSPACE_JWT'{
"range": "30d",
"firstResponseTime": {
"p50": 240, // seconds
"p90": 1800,
"p99": 14400
},
"resolutionTime": {
"p50": 7200,
"p90": 86400,
"p99": 259200
},
"byDepartment": [
{ "departmentId": "uuid", "name": "Support", "p50FRT": 180, "p90FRT": 1500 },
{ "departmentId": "uuid", "name": "Billing", "p50FRT": 420, "p90FRT": 3600 }
]
}Filter by adding query params:
range=7d|30d|90d|custom(thenfromandtoas ISO timestamps).departmentId=<uuid>.agentId=<uuid>.
Response time excludes off-hours when business hours are configured. p50FRT of 240 seconds means median first-reply within 4 minutes of business-hours clock.
Pull CSAT
Endpoint: GET /api/v1/reports/tickets/satisfaction?range=30d.
{
"range": "30d",
"ratingCount": 412,
"responseRate": 0.31, // 31% of solved conversations rated
"averageRating": 4.6,
"byScore": { "1": 12, "2": 8, "3": 22, "4": 68, "5": 302 },
"byAgent": [
{ "agentId": "uuid", "name": "Sam", "ratingCount": 84, "averageRating": 4.8 }
]
}The default CSAT prompt is a 1-5 scale sent automatically when a conversation moves to solved. Configure under Settings → Reports → CSAT: prompt copy, scale (1-5 or thumbs up/down), delay before sending, and which channels to ask on.
Build a dashboard
Three patterns:
- Server-side cron + database. Hit the endpoints hourly, store snapshots, render with whatever BI tool you already use.
- Edge function + chart library. Lightweight HTML dashboard hosted on Cloudflare Pages / Vercel, fetches on view.
- Looker / Metabase / Mode. Use the export endpoint (
GET /api/v1/reports/export?range=30d&type=conversations&format=csv) on a schedule and load to your warehouse.
Set SLA alerts
Two patterns:
- Polling. Cron job hits
/reports/tickets/response-timesevery 15 minutes. Ifp90FRT > threshold, page on-call. - Live stream. Subscribe to the agent Socket.io namespace and watch for stale conversations (no agent message for X minutes). See Agent namespace.
Common pitfalls
- p50 vs mean. Use percentiles. A handful of outlier tickets ruin a mean. p50 plus p90 plus p99 tells the real story.
- Off-hours conversations. If business hours are not configured, response time counts wall-clock. Set business hours so a Saturday email does not inflate Monday numbers.
- Low CSAT response rate. 31% is industry-typical. Lower means under-prompted or over-prompted. Tune the delay.
- Agent attribution. If a conversation passes through three agents, "agent CSAT" can mean different things. The default attributes to the last agent before solved. Change in settings if you prefer first-agent or shared.