CSAT analytics
Customer-satisfaction (CSAT) analytics for a company’s closed conversations. Four read-only endpoints under /v1/csat aggregate satisfaction-survey results for a chosen period: summary metrics, breakdowns, a day-by-day trend, and a list of negatively rated conversations.
Access and enabling CSAT
All four endpoints require an active subscription and the company.view permission; in addition, CSAT must be enabled in the company settings — if surveys are turned off, every endpoint returns 404.
Period parameters
The period parameters are identical across all four endpoints:
period—today,7d,30d(default7d), or an explicitfrom+torange (YYYY-MM-DDdates; applied only when both are set andtois ≥from).timezone— an IANA zone used to compute day boundaries (defaultUTC).
What each endpoint returns
GET /csat/metrics— a summary:sent(surveys inpending/responded/expiredstatus),responded,positive,negative,satisfaction_pct(share of positive among responders),response_rate_pct(share of responders among sent), anddelta— the change insatisfaction_pctversus the preceding period of equal length.GET /csat/breakdowns— two breakdowns of responded surveys:by_participant(per operator or AI agent) andby_channel(per channel type).GET /csat/trend— a per-day array over the period (days with no responses are zero-filled).GET /csat/conversations— a paginated list of conversations with a negative rating only; it can be further filtered bychannel_type_keyand by themember_type(user|ai_agent)+member_idpair (both required together), and supportsper_page(1–100, default 20) andpage(default 1).
Response envelope
The conversations response is wrapped in { data: { items, pagination } }; the other three are wrapped in { data: ... }.
Endpoints
| Method | Path | Summary |
|---|---|---|
| GET | /v1/csat/metricsCSAT summary metrics for a period (+delta vs previous period) | CSAT summary metrics for a period (+delta vs previous period) |
| GET | /v1/csat/breakdownsSatisfaction breakdown by participant and channel | Satisfaction breakdown by participant and channel |
| GET | /v1/csat/trendDay-by-day satisfaction trend | Day-by-day satisfaction trend |
| GET | /v1/csat/conversationsList of negatively rated conversations (paginated) | List of negatively rated conversations (paginated) |
Examples
Summary metrics for 30 days
Request
curl "https://api.aisar.app/v1/csat/metrics?period=30d" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"sent": 210,
"responded": 168,
"positive": 149,
"negative": 19,
"satisfaction_pct": 89,
"response_rate_pct": 80,
"delta": 4
}
}Breakdown by participant and channel
Request
curl "https://api.aisar.app/v1/csat/breakdowns?period=30d" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"by_participant": [
{
"member_type": "user",
"member_id": 12,
"name": "Aida Nurlanova",
"is_ai": false,
"responded": 92,
"positive": 84,
"negative": 8,
"satisfaction_pct": 91
},
{
"member_type": "ai_agent",
"member_id": 4,
"name": "Support Assistant",
"is_ai": true,
"responded": 76,
"positive": 65,
"negative": 11,
"satisfaction_pct": 86
}
],
"by_channel": [
{ "channel_type_key": "whatsapp", "responded": 118, "positive": 106 },
{ "channel_type_key": "instagram", "responded": 50, "positive": 43 }
]
}
}Day-by-day trend (gaps zero-filled)
Request
curl "https://api.aisar.app/v1/csat/trend?period=7d&timezone=Asia/Almaty" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": [
{ "date": "2026-03-09", "responded": 0, "positive": 0, "negative": 0, "satisfaction_pct": 0 },
{ "date": "2026-03-10", "responded": 22, "positive": 20, "negative": 2, "satisfaction_pct": 91 },
{ "date": "2026-03-11", "responded": 18, "positive": 15, "negative": 3, "satisfaction_pct": 83 }
]
}Negatively rated conversations (channel filter)
Request
curl "https://api.aisar.app/v1/csat/conversations?period=30d&channel_type_key=whatsapp&per_page=20" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"items": [
{
"id": 5012,
"conversation_id": 8841,
"responded_at": "2026-03-15T09:42:11+00:00",
"channel_type_key": "whatsapp",
"raw_response": "Долго ждал ответа",
"contact": {
"id": 3307,
"name": "Ivan Petrov"
},
"participants": [
{ "name": "Aida Nurlanova", "is_ai": false }
]
}
],
"pagination": {
"page": 1,
"perPage": 20,
"total": 1,
"lastPage": 1
}
}
}CSAT disabled for the company (404)
Request
curl "https://api.aisar.app/v1/csat/metrics" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"message": ""
}