GET
/
v2
/
agents
/
{agent_id}
/
analytics
curl --request GET \
  --url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Agent analytics retrieved successfully",
  "data": {
    "loads": [
      {
        "record": "load",
        "userID": "<string>",
        "ipAddress": "<string>",
        "countryCode": "<string>",
        "langCode": "<string>",
        "browser": "<string>",
        "platform": "<string>",
        "origin": "web-chat",
        "ts": 123,
        "interactionsNum": 123,
        "firstMessageTS": 123,
        "lastMessageTS": 123
      }
    ],
    "convos": [
      {
        "record": "load",
        "userID": "<string>",
        "ipAddress": "<string>",
        "countryCode": "<string>",
        "langCode": "<string>",
        "browser": "<string>",
        "platform": "<string>",
        "origin": "web-chat",
        "ts": 123,
        "interactionsNum": 123,
        "firstMessageTS": 123,
        "lastMessageTS": 123
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Agent/Workspace secret API key as bearer token.

Path Parameters

agent_id
string
required

The ID of the agent to retrieve analytics from

Query Parameters

start_ts
number

the start unix timestamb of the analytics, by default 30 days ago.

stop_ts
number

the end unix timestamb of the analytics, by default now.

Response

200
application/json
Agent analytics retrieved
success
boolean
message
string
data
object

Analytics data