Get Advisor Conversations
curl --request POST \
--url https://api.jelou.ai/v1/metrics/conversations/attended/external \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": true
}
'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/attended/external"
payload = {
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({startAt: '2023-11-07T05:31:56Z', endAt: '2023-11-07T05:31:56Z', getJson: true})
};
fetch('https://api.jelou.ai/v1/metrics/conversations/attended/external', 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/attended/external",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startAt' => '2023-11-07T05:31:56Z',
'endAt' => '2023-11-07T05:31:56Z',
'getJson' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jelou.ai/v1/metrics/conversations/attended/external"
payload := strings.NewReader("{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jelou.ai/v1/metrics/conversations/attended/external")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/attended/external")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}"
response = http.request(request)
puts response.read_body{
"message": [
"<string>"
],
"status": "<string>",
"results": [
{
"_id": "<string>",
"operator": {
"names": "<string>"
},
"user": {
"id": "<string>"
},
"bot": {
"name": "<string>"
},
"company": {
"id": "<string>"
},
"assignationMethod": {
"teamName": "<string>"
},
"endedReason": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"origin": "<string>",
"timeRepliedOperator": 123,
"conversationDuration": 123
}
],
"pagination": {
"limit": 123,
"page": 123,
"total": 123,
"offset": 123,
"totalPages": 123
},
"links": [
{}
]
}{
"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": {}
}Conversations
Agent conversations
Query conversations handled by human agents
POST
/
v1
/
metrics
/
conversations
/
attended
/
external
Get Advisor Conversations
curl --request POST \
--url https://api.jelou.ai/v1/metrics/conversations/attended/external \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": true
}
'import requests
url = "https://api.jelou.ai/v1/metrics/conversations/attended/external"
payload = {
"startAt": "2023-11-07T05:31:56Z",
"endAt": "2023-11-07T05:31:56Z",
"getJson": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({startAt: '2023-11-07T05:31:56Z', endAt: '2023-11-07T05:31:56Z', getJson: true})
};
fetch('https://api.jelou.ai/v1/metrics/conversations/attended/external', 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/attended/external",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startAt' => '2023-11-07T05:31:56Z',
'endAt' => '2023-11-07T05:31:56Z',
'getJson' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jelou.ai/v1/metrics/conversations/attended/external"
payload := strings.NewReader("{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jelou.ai/v1/metrics/conversations/attended/external")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/metrics/conversations/attended/external")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startAt\": \"2023-11-07T05:31:56Z\",\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"getJson\": true\n}"
response = http.request(request)
puts response.read_body{
"message": [
"<string>"
],
"status": "<string>",
"results": [
{
"_id": "<string>",
"operator": {
"names": "<string>"
},
"user": {
"id": "<string>"
},
"bot": {
"name": "<string>"
},
"company": {
"id": "<string>"
},
"assignationMethod": {
"teamName": "<string>"
},
"endedReason": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"origin": "<string>",
"timeRepliedOperator": 123,
"conversationDuration": 123
}
],
"pagination": {
"limit": 123,
"page": 123,
"total": 123,
"offset": 123,
"totalPages": 123
},
"links": [
{}
]
}{
"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": {}
}Retrieve conversations attended by a human agent to analyze response times, closure states, and assignments. You receive metadata about operators, users, and bots involved within a defined date range.
Endpoint
POST https://api.jelou.ai/v1/metrics/conversations/attended/external
Authentication
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| Authorization | Header | string | Yes | Credentials in clientId:clientSecret format. |
Query Parameters
| Field | Location | Type | Required | Default value | Description |
|---|---|---|---|---|---|
| limit | Query | integer | No | 10 | Maximum number of conversations per page. |
| page | Query | integer | No | 1 | Page number for pagination. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| startAt | string | Yes | Start date of the range in ISO 8601 format. Example: 2025-01-01T00:00:00-05:00 |
| endAt | string | Yes | End date of the range in ISO 8601 format. Example: 2025-01-01T23:59:59-05:00 |
| getJson | boolean | Yes | Must be true to receive the response in JSON format. |
Use bounded time windows to optimize the query and avoid overly wide ranges if you handle high volumes of conversations.
Request Examples
- cURL
- JavaScript
curl -X POST 'https://api.jelou.ai/v1/metrics/conversations/attended/external?limit=10' \
-H 'Authorization: <clientId>:<clientSecret>' \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"startAt": "2025-01-01T00:00:00-05:00",
"endAt": "2025-01-01T23:59:59-05:00",
"getJson": true
}'
const axios = require('axios');
axios({
method: 'POST',
url: 'https://api.jelou.ai/v1/metrics/conversations/attended/external',
params: { limit: 10 },
headers: {
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': '<clientId>:<clientSecret>'
},
data: {
startAt: '2025-01-01T00:00:00-05:00',
endAt: '2025-01-01T23:59:59-05:00',
getJson: true
}
});
Responses
200 - Successful response
200 - Successful response
{
"message": ["Retrieving conversations succeeded"],
"status": "success",
"results": [
{
"_id": "CONVERSATION_ID",
"operator": {
"names": "OPERATOR_NAME"
},
"user": {
"id": "ID"
},
"bot": {
"name": "BOT_NAME"
},
"company": {
"id": "COMPANY_ID"
},
"assignationMethod": {
"teamName": "TEAM_NAME"
},
"state": "expired",
"endedReason": "expired",
"startAt": "2023-06-08 15:52:41",
"endAt": "2023-06-08 23:07:56",
"origin": "ticket",
"timeRepliedOperator": 795880,
"conversationDuration": 26115953
}
],
"pagination": {
"limit": 1,
"total": 61,
"offset": 0,
"totalPages": 61
},
"links": [
{
"number": 1,
"url": "/v1/metrics/conversations/attended/external?limit=1&page=1"
},
{
"number": 2,
"url": "/v1/metrics/conversations/attended/external?limit=1&page=2"
}
]
}
401 - Unauthorized
401 - Unauthorized
{
"message": "Authentication failed"
}
422 - Unprocessable Entity
422 - Unprocessable Entity
{
"message": ["The values entered are not correct."],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0422",
"key": "VALIDATOR_ERROR"
}
}
429 - Too Many Requests
429 - Too Many Requests
{
"message": "Rate limit exceeded"
}
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 Detail
results object
| Field | Type | Description |
|---|---|---|
| _id | string | Unique conversation identifier. |
| operator | object | Information about the operator who attended the conversation (names). |
| user | object | User information (id). |
| bot | object | Associated bot information (name). |
| company | object | Company information (id). |
| assignationMethod | object | Assignment method and team (teamName). |
| state | string | Conversation state: active, closed, resolved, expired. |
| endedReason | string | Reason why the conversation ended. |
| startAt | string | Conversation start date and time. |
| endAt | string | Conversation end date and time. |
| origin | string | Conversation source (e.g.: ticket). |
| timeRepliedOperator | number | Operator response time in milliseconds. |
| conversationDuration | number | Total conversation duration in milliseconds. |
pagination object
| Field | Type | Description |
|---|---|---|
| limit | integer | Conversations returned per page. |
| total | integer | Total conversations matching the filters. |
| offset | integer | Conversations skipped according to the requested page. |
| totalPages | integer | Total number of available pages. |
links object
| Field | Type | Description |
|---|---|---|
| number | integer | Page number. |
| url | string | Relative URL to access that page. |
Performance metrics
Use the
timeRepliedOperator and conversationDuration fields to analyze the efficiency of your support team:- timeRepliedOperator: Measures the time it takes an agent to give the first response (in milliseconds).
- conversationDuration: Measures the total duration from the start to the close of the conversation (in milliseconds).
Authorizations
Basic authentication using Base64 encoded clientId:clientSecret
Body
application/json
Was this page helpful?
⌘I