Skip to main content
GET
/
backend
/
reports
/
:orgId
/
agents
/
performance
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/agents/performance?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "agent_id": 1,
    "total_chats": 150,
    "avg_duration": 420.5
  },
  {
    "agent_id": 2,
    "total_chats": 120,
    "avg_duration": 380.2
  }
]
This endpoint provides performance metrics for agents, including the total number of chats handled and their average duration. Performance in this context refers to the quantity of chats an agent manages and how quickly they resolve them.

Authentication

Authorization
string
required
Bearer token for authentication

Path Parameters

orgId
string
required
The unique identifier of the organization

Query Parameters

startDate
string
The start date for the report period (ISO 8601 format)
endDate
string
The end date for the report period (ISO 8601 format)

Response

agent_id
number
The unique identifier of the agent
total_chats
number
The total number of chats handled by the agent
avg_duration
number
The average duration of chat sessions for the agent (in seconds)
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/agents/performance?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "agent_id": 1,
    "total_chats": 150,
    "avg_duration": 420.5
  },
  {
    "agent_id": 2,
    "total_chats": 120,
    "avg_duration": 380.2
  }
]