Skip to main content
GET
/
api
/
v2
/
analytics
/
agent
Get agent analytics
curl --request GET \
  --url https://app.livechatai.com/api/v2/analytics/agent \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "currentPeriod": {
      "totalConversationCount": 45,
      "closedConversationCount": 38,
      "agentResponseTime": 1250,
      "avarageMessagesPerConversation": 8.5,
      "averageAgentCSATScore": 4.2,
      "totalAgentCSATResponses": 28,
      "changes": {
        "totalConversationCount": 12.5,
        "closedConversationCount": 8.3,
        "agentResponseTime": -5.2,
        "avarageMessagesPerConversation": 3.7,
        "averageAgentCSATScore": 4.1
      }
    },
    "previousPeriod": {
      "totalConversationCount": 40,
      "closedConversationCount": 35,
      "agentResponseTime": 1318,
      "avarageMessagesPerConversation": 8.2,
      "averageAgentCSATScore": 4,
      "totalAgentCSATResponses": 25
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

agentId
string
required

The ID of the agent/chatbot

Example:

"clx1234567890abcdef"

startDate
string<date>
required

Start date for analytics (ISO 8601 format)

Example:

"2024-01-01"

endDate
string<date>
required

End date for analytics (ISO 8601 format)

Example:

"2024-01-31"

userId
string

Optional specific agent/user ID to filter analytics

Example:

"user_1234567890"

timezone
string

Timezone for date calculations (defaults to system timezone)

Example:

"America/New_York"

Response

Successfully retrieved agent analytics data

status
string
Example:

"success"

data
object