curl --request GET \
--url https://api.jelou.ai/v1/metrics/conversations/external/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/external/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.jelou.ai/v1/metrics/conversations/external/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jelou.ai/v1/metrics/conversations/external/stats",
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: Basic <encoded-value>"
],
]);
$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 := "https://api.jelou.ai/v1/metrics/conversations/external/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jelou.ai/v1/metrics/conversations/external/stats")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/external/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_id": 123,
"total": 123,
"actual": 123,
"attended": 123,
"expired": 123,
"lastMessageOperator": 123,
"lastMessageUser": 123,
"lastMessageBot": 123,
"notAttended": 123,
"avgReplyTime": 123,
"avgOperatorResponseTime": 123,
"transfered": 123,
"avgConversationTime": 123,
"operator": {
"id": 123,
"names": "<string>",
"email": "<string>",
"companyId": 123
}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Operator statistics
Total, attended, unattended cases and response times for your operators
curl --request GET \
--url https://api.jelou.ai/v1/metrics/conversations/external/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/external/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.jelou.ai/v1/metrics/conversations/external/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jelou.ai/v1/metrics/conversations/external/stats",
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: Basic <encoded-value>"
],
]);
$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 := "https://api.jelou.ai/v1/metrics/conversations/external/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jelou.ai/v1/metrics/conversations/external/stats")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/external/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"_id": 123,
"total": 123,
"actual": 123,
"attended": 123,
"expired": 123,
"lastMessageOperator": 123,
"lastMessageUser": 123,
"lastMessageBot": 123,
"notAttended": 123,
"avgReplyTime": 123,
"avgOperatorResponseTime": 123,
"transfered": 123,
"avgConversationTime": 123,
"operator": {
"id": 123,
"names": "<string>",
"email": "<string>",
"companyId": 123
}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}operatorId for individual analysis, or query the full range for a team-wide overview.
Endpoint
GET https://api.jelou.ai/v1/metrics/conversations/external/stats
Authentication
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| Authorization | Header | string | Yes | Credentials in Basic <clientId:clientSecret> format. |
Query parameters
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| startAt | Query | Date | Yes | Search start date. |
| endAt | Query | Date | Yes | Search end date. |
| operatorId | Query | Int | No | Operator ID when you want to search for a specific operator. |
operatorId, the query aggregates statistics for all operators within the given date range.Request examples
- cURL
- JavaScript
curl --request GET \
--url 'https://api.jelou.ai/v1/metrics/conversations/external/stats?startAt=2025-02-01&endAt=2025-02-10' \
--header 'Authorization: Basic <clientId:clientSecret>'
const axios = require('axios');
axios({
method: 'GET',
url: 'https://api.jelou.ai/v1/metrics/conversations/external/stats',
params: {
startAt: '2025-02-01',
endAt: '2025-02-10'
},
headers: {
'Authorization': 'Basic <clientId:clientSecret>'
}
});
Responses
200 - Successful response
200 - Successful response
{
"_id": 123456,
"total": 6,
"actual": 0,
"attended": 6,
"expired": 0,
"lastMessageOperator": 5,
"lastMessageUser": 1,
"lastMessageBot": 0,
"notAttended": 0,
"avgReplyTime": 50.095333333333336,
"avgOperatorResponseTime": 119,
"transfered": 0,
"avgConversationTime": 3738.2073333333333,
"operator": {
"id": 987654,
"names": "Jane Doe",
"email": "[email protected]",
"companyId": 4321
}
}
401 - Unauthorized
401 - Unauthorized
{
"message": "Authentication failed"
}
422 - Unprocessable Entity
422 - Unprocessable Entity
{
"message": [
"Los valores ingresados no son correctos."
],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0422",
"key": "VALIDATOR_ERROR",
"description": "Error to be thrown when cannot process request because of incoming values",
"developerMessages": {
"es": "Los valores del request no son correctos para ser procesados.",
"en": "The request values are not correct for processing."
},
"clientMessages": {
"es": "Los valores ingresados no son correctos.",
"en": "The values entered are not correct."
}
},
"validationError": {
"startAt": [
{
"es": "El campo startAt es requerido",
"en": "The startAt field is required",
"pt": "O campo startAt é obrigatório"
}
]
}
}
500 - Internal Server Error
500 - Internal Server Error
{
"message": ["We are having trouble processing your request. Please try again later."],
"statusMessage": "failed",
"status": 0
}
Response details
| Field | Type | Description |
|---|---|---|
| _id | integer | Identifier of the queried operator or aggregation. |
| total | integer | Total cases within the date range. |
| actual | integer | Cases currently in the queue. |
| attended | integer | Attended cases. |
| expired | integer | Cases that expired without attention. |
| lastMessageOperator | integer | Conversations whose last message was sent by the operator. |
| lastMessageUser | integer | Conversations whose last message was sent by the user. |
| lastMessageBot | integer | Conversations whose last message was sent by the channel. |
| notAttended | integer | Unattended cases. |
| avgReplyTime | number | Average reply time, in seconds. |
| avgOperatorResponseTime | number | Average operator response time, in seconds. |
| transfered | integer | Cases transferred to another operator or team. |
| avgConversationTime | number | Average conversation duration, in seconds. |
| operator | object | Information about the queried operator. |
| operator.id | integer | Operator identifier. |
| operator.names | string | Operator name. |
| operator.email | string | Operator email address. |
| operator.companyId | integer | Identifier of the company the operator belongs to. |
attended and notAttended together with avgOperatorResponseTime to evaluate each operator’s workload and efficiency within the queried range.Authorizations
Basic authentication using Base64 encoded clientId:clientSecret
Query Parameters
Search start date
Search end date
Operator ID to filter statistics for a specific operator
Response
Statistics retrieved successfully
Identifier of the queried operator or aggregation
Total cases within the date range
Cases currently in the queue
Attended cases
Cases that expired without attention
Conversations whose last message was sent by the operator
Conversations whose last message was sent by the user
Conversations whose last message was sent by the bot
Unattended cases
Average reply time, in seconds
Average operator response time, in seconds
Cases transferred to another operator or team
Average conversation duration, in seconds
Show child attributes
Show child attributes
Was this page helpful?