Get conversation resolution time statistics
curl --request GET \
--url http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2000",
CURLOPT_URL => "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "",
"data": {
"fromFirstEmail": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
},
"fromLastAssignedAgent": {
"withDelays": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
},
"withoutDelays": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
}
}
}
}Agent Analytics
Conversation Resolution Times
Retrieves metrics about how long conversations take to resolve. - Includes resolution times from the first received email and from the last assigned agent, both with and without delays. - If no startDate or endDate is provided, defaults to the last 7 days (a week from today).
GET
/
email-meter
/
stats
/
resolved-times
/
{startDate}
/
{endDate}
Get conversation resolution time statistics
curl --request GET \
--url http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2000",
CURLOPT_URL => "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2000/email-meter/stats/resolved-times/{startDate}/{endDate}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "",
"data": {
"fromFirstEmail": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
},
"fromLastAssignedAgent": {
"withDelays": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
},
"withoutDelays": {
"min": 0.5,
"max": 26.5,
"average": 4.2,
"median": 3.9,
"count": 200
}
}
}
}Retrieves metrics about how long conversations take to resolve. Includes resolution times from the first received email and from the last assigned agent, both with and without delays.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | Start date of the range (ISO 8601). Defaults to 7 days before today |
| endDate | string | Yes | End date of the range (ISO 8601). Defaults to today |
Parameter Format
- Format:
YYYY-MM-DD(ISO 8601 date) - Timezone: UTC
- Default: Last 7 days if not provided
Response
200 OK - Successfully retrieved resolution time statistics
{
"message": "",
"data": {
"fromFirstEmail": {
"min": 15,
"max": 480,
"average": 85.5,
"median": 72.0
},
"fromLastAssignedAgent": {
"withDelays": {
"min": 5,
"max": 240,
"average": 45.8,
"median": 38.5
},
"withoutDelays": {
"min": 2,
"max": 120,
"average": 25.4,
"median": 20.0
}
}
}
}
401 Unauthorized
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid token"
}
}
500 Internal Server Error
{
"error": {
"code": "SERVER_ERROR",
"message": "Internal server error"
}
}
Example
curl -X GET 'http://localhost:2000/email-meter/stats/resolved-times/2025-10-01/2025-10-20' \
-H 'Authorization: oBearerBearer your-jwt-token'
'
Data Fields Explained
From First Email
| Field | Type | Description |
|---|---|---|
| min | number | Minimum time from first email to resolution (minutes) |
| max | number | Maximum time from first email to resolution (minutes) |
| average | number | Average time from first email to resolution (minutes) |
| median | number | Median time from first email to resolution (minutes) |
From Last Assigned Agent
| Field | Type | Description |
|---|---|---|
| withDelays | object | Resolution times including delays (minutes) |
| withoutDelays | object | Resolution times excluding delays (minutes) |
Resolution Time Metrics
| Field | Type | Description |
|---|---|---|
| min | number | Minimum resolution time (minutes) |
| max | number | Maximum resolution time (minutes) |
| average | number | Average resolution time (minutes) |
| median | number | Median resolution time (minutes) |
Resolution Categories
Time Categories
- Excellent: < 30 minutes
- Good: 30-60 minutes
- Acceptable: 60-120 minutes
- Needs Improvement: 120-240 minutes
- Critical: > 240 minutes
Delay Impact
const delayImpact = {
withDelays: data.data.fromLastAssignedAgent.withDelays.average,
withoutDelays: data.data.fromLastAssignedAgent.withoutDelays.average,
impactPercentage: ((withDelays - withoutDelays) / withoutDelays) * 100
};
Use Cases
- Service Quality: Monitor conversation resolution efficiency
- Process Improvement: Identify bottlenecks in resolution
- Customer Experience: Track time to issue resolution
- Team Performance: Evaluate agent resolution capabilities
- SLA Management: Track resolution service level agreements
Performance Metrics
Resolution Efficiency
const efficiencyMetrics = {
sameDayResolution: percentage < 1440, // Less than 24 hours
quickResolution: percentage < 60, // Less than 1 hour
standardResolution: percentage < 480, // Less than 8 hours
extendedResolution: percentage >= 480 // More than 8 hours
};
Delay Analysis
- Processing Delays: Time spent in queues and routing
- Agent Delays: Time waiting for agent availability
- Customer Delays: Time waiting for customer responses
- System Delays: Technical processing delays
Best Practices
- Monitoring: Track resolution times continuously
- Alerts: Set up alerts for extended resolutions
- Analysis: Analyze patterns in delayed resolutions
- Optimization: Streamline resolution processes
- Training: Focus on resolution time improvement
Related Endpoints
- Use
/email-meter/stats/response-timesfor initial response metrics - Use
/email-meter/stats/agents-detailedfor agent-specific resolution data - Use
/email-meter/stats/flagsfor flagged conversation metrics
Notes
- Resolution times are calculated in minutes
- Times are based on business hours by default
- Only resolved conversations are included in calculations
- Delays include queue time, routing delays, and customer response waits
- Automated resolutions are excluded from manual resolution metrics
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Start date of the range (ISO 8601). Defaults to 7 days before today if not provided.
End date of the range (ISO 8601). Defaults to today if not provided.
Was this page helpful?