Skip to main content
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
}
'
{
  "message": [
    "<string>"
  ],
  "status": "<string>",
  "results": [
    {
      "_id": "<string>",
      "operator": {
        "names": "<string>"
      },
      "user": {
        "id": "<string>"
      },
      "bot": {
        "name": "<string>"
      },
      "company": {
        "id": "<string>"
      },
      "assignationMethod": {
        "teamName": "<string>"
      },
      "state": "active",
      "endedReason": "<string>",
      "startAt": "<string>",
      "endAt": "<string>",
      "origin": "<string>",
      "timeRepliedOperator": 123,
      "conversationDuration": 123
    }
  ],
  "pagination": {
    "limit": 123,
    "page": 123,
    "total": 123,
    "offset": 123,
    "totalPages": 123
  },
  "links": [
    {}
  ]
}
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

FieldLocationTypeRequiredDescription
AuthorizationHeaderstringYesCredentials in clientId:clientSecret format.

Query Parameters

FieldLocationTypeRequiredDefault valueDescription
limitQueryintegerNo10Maximum number of conversations per page.
pageQueryintegerNo1Page number for pagination.

Request Body

FieldTypeRequiredDescription
startAtstringYesStart date of the range in ISO 8601 format. Example: 2025-01-01T00:00:00-05:00
endAtstringYesEnd date of the range in ISO 8601 format. Example: 2025-01-01T23:59:59-05:00
getJsonbooleanYesMust 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 -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
  }'

Responses

{
  "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"
    }
  ]
}
{
  "message": "Authentication failed"
}
{
  "message": ["The values entered are not correct."],
  "statusMessage": "failed",
  "status": 0,
  "error": {
    "code": "E0422",
    "key": "VALIDATOR_ERROR"
  }
}
{
  "message": "Rate limit exceeded"
}
{
  "message": ["We are having trouble processing your request. Please try again later."],
  "statusMessage": "failed",
  "status": 0
}

Response Detail

results object

FieldTypeDescription
_idstringUnique conversation identifier.
operatorobjectInformation about the operator who attended the conversation (names).
userobjectUser information (id).
botobjectAssociated bot information (name).
companyobjectCompany information (id).
assignationMethodobjectAssignment method and team (teamName).
statestringConversation state: active, closed, resolved, expired.
endedReasonstringReason why the conversation ended.
startAtstringConversation start date and time.
endAtstringConversation end date and time.
originstringConversation source (e.g.: ticket).
timeRepliedOperatornumberOperator response time in milliseconds.
conversationDurationnumberTotal conversation duration in milliseconds.

pagination object

FieldTypeDescription
limitintegerConversations returned per page.
totalintegerTotal conversations matching the filters.
offsetintegerConversations skipped according to the requested page.
totalPagesintegerTotal number of available pages.
FieldTypeDescription
numberintegerPage number.
urlstringRelative 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

Authorization
string
header
required

Basic authentication using Base64 encoded clientId:clientSecret

Query Parameters

limit
integer
default:10
page
integer
default:1

Body

application/json
startAt
string<date-time>
required
endAt
string<date-time>
required
getJson
boolean
required

Response

Conversations retrieved successfully

message
string[]
status
string
results
object[]
pagination
object