API Reference
API Documentation
V3
- Get Started
- π Workspaces
- π€ Agents
- Calls & Numbers
- π¨ Tools
- βοΈ Variables
- π₯ Leads
- π§ Knowledge Base
Agents
Workspaces
- GETGet Workspace
- POSTEdit Workspace
- DELDelete Workspace
- πΌ Agency
- π’ Orgs
- π€ Clients
Get All Analytics
Returns agent analytics data with start and stop timestamps
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
Agent/Workspace secret API key as bearer token.
Path Parameters
The ID of the agent to retrieve analytics from
Query Parameters
the start unix timestamb of the analytics, by default 30 days ago.
the end unix timestamb of the analytics, by default now.
Response
Analytics data
Loads/Web traffic analytics
Type of analytics whether its a load on website or the conversation analytics/metadata.
load
, convo
The associated conversation id/user id with the.
The IP address of the user.
The country code associated with the user's location.
The language code indicating the user's language.
The user's browser information.
The platform or device used by the user.
The channel origin of the message.
web-chat
, whatsapp
, discord
, gb-chat
Timestamp indicating when the analytic load occurred.
The number of interactions made by the user. (messages from user only)
Timestamp of the first message sent by the user.
Timestamp of the last message sent by the user.
Conversations analytics
Type of analytics whether its a load on website or the conversation analytics/metadata.
load
, convo
The associated conversation id/user id with the.
The IP address of the user.
The country code associated with the user's location.
The language code indicating the user's language.
The user's browser information.
The platform or device used by the user.
The channel origin of the message.
web-chat
, whatsapp
, discord
, gb-chat
Timestamp indicating when the analytic load occurred.
The number of interactions made by the user. (messages from user only)
Timestamp of the first message sent by the user.
Timestamp of the last message sent by the user.
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
}
]
}
}