Analytics
Team performance analytics, agent stats, and CSAT data. All analytics endpoints require a secret key.
The Analytic object
Time period for the data
Total tickets in period
Currently open tickets
Tickets resolved in period
Total customers
Average CSAT score
Endpoints
GET
/api/v1/teams/{teamId}/analytics/overviewGet Overview
Try itGet a summary of ticket, customer, and CSAT metrics for a time period.
Query Parameters
period string Time period
Default: week
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/analytics/overview?period=week" \
-H "Authorization: Bearer sk_live_your_key"Responses
200 Analytics overview
{
"success": true,
"data": {
"object": "analytics_overview",
"period": "week",
"tickets": {
"total": 142,
"open": 23,
"resolved": 89
},
"customers": {
"total": 450,
"active": 120,
"new": 15
},
"csat": {
"average": 4.2,
"totalResponses": 67
}
}
}401 Authentication failed — missing or invalid API key
{
"success": false,
"error": {
"type": "authentication_error",
"code": "authentication_required",
"message": "Invalid or expired API key",
"doc_url": "https://www.cstar.help/developers/api-reference#authentication",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}403 Insufficient permissions — wrong key type or team access
{
"success": false,
"error": {
"type": "authorization_error",
"code": "insufficient_permissions",
"message": "Secret key required for this endpoint",
"doc_url": "https://www.cstar.help/developers/api-reference#authentication",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}429 Rate limit exceeded
{
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds",
"doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}GET
/api/v1/teams/{teamId}/analytics/agentsGet Agent Stats
Try itGet per-agent performance metrics.
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/analytics/agents" \
-H "Authorization: Bearer sk_live_your_key"Responses
200 Agent stats
{
"success": true,
"data": [
{
"object": "agent_stats",
"userId": "usr_abc",
"name": "Jane",
"ticketsResolved": 45,
"avgResponseTime": 12.5,
"csatAverage": 4.8
}
]
}401 Authentication failed — missing or invalid API key
{
"success": false,
"error": {
"type": "authentication_error",
"code": "authentication_required",
"message": "Invalid or expired API key",
"doc_url": "https://www.cstar.help/developers/api-reference#authentication",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}403 Insufficient permissions — wrong key type or team access
{
"success": false,
"error": {
"type": "authorization_error",
"code": "insufficient_permissions",
"message": "Secret key required for this endpoint",
"doc_url": "https://www.cstar.help/developers/api-reference#authentication",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}429 Rate limit exceeded
{
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds",
"doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}