Analytics
Retrieve analytics and conversation data.
GET
/api/analytics/overviewJWTWorkspace Overview
Get high-level analytics for the workspace.
Headers
| Header | Value |
|---|---|
| X-Workspace-ID | your-workspace-id |
Response
json
{
"data": {
"total_agents": 3,
"total_conversations": 156,
"total_messages": 1247,
"credits_used": 1247,
"credits_remaining": 3753,
"conversations_by_channel": {
"widget": 89,
"api": 45,
"playground": 22
}
}
}GET
/api/agents/:id/analyticsJWTAgent Analytics
Get analytics for a specific agent.
Headers
| Header | Value |
|---|---|
| X-Workspace-ID | your-workspace-id |
URL Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Agent ID |
Response
json
{
"data": {
"total_conversations": 89,
"total_messages": 567,
"avg_messages_per_conversation": 6.4,
"conversations_by_channel": {
"widget": 52,
"api": 30,
"playground": 7
}
}
}