curl --request GET \
--url https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": 1,
"conversations_count": 150,
"resolved_conversations_count": 120,
"avg_resolution_time": 3600,
"avg_first_response_time": 300,
"avg_reply_time": 600
},
{
"id": 2,
"conversations_count": 75,
"resolved_conversations_count": 60,
"avg_resolution_time": 1800,
"avg_first_response_time": 180,
"avg_reply_time": 420
}
]{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Get conversation statistics grouped by agent
Get conversation statistics grouped by agent for a given date range. Returns metrics for each agent including conversation counts, resolution counts, average first response time, average resolution time, and average reply time.
curl --request GET \
--url https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v2/accounts/{account_id}/summary_reports/agent"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": 1,
"conversations_count": 150,
"resolved_conversations_count": 120,
"avg_resolution_time": 3600,
"avg_first_response_time": 300,
"avg_reply_time": 600
},
{
"id": 2,
"conversations_count": 75,
"resolved_conversations_count": 60,
"avg_resolution_time": 1800,
"avg_first_response_time": 180,
"avg_reply_time": 420
}
]{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
The numeric ID of the account
Query Parameters
The timestamp from where report should start (Unix timestamp).
The timestamp from where report should stop (Unix timestamp).
Whether to calculate metrics using business hours only.
Response
Success
The agent (user) ID
Number of conversations assigned to the agent during the date range
Number of conversations resolved by the agent during the date range
Average time (in seconds) to resolve conversations. Null if no data available.
Average time (in seconds) for the first response. Null if no data available.
Average time (in seconds) between replies. Null if no data available.
[
{
"id": 1,
"conversations_count": 150,
"resolved_conversations_count": 120,
"avg_resolution_time": 3600,
"avg_first_response_time": 300,
"avg_reply_time": 600
},
{
"id": 2,
"conversations_count": 75,
"resolved_conversations_count": 60,
"avg_resolution_time": 1800,
"avg_first_response_time": 180,
"avg_reply_time": 420
}
]