API Reference
API Documentation
V3
- Get Started
- π Workspaces
- π€ Agents
- Calls & Numbers
- π¨ Tools
- βοΈ Variables
- π₯ Leads
- π§ Knowledge Base
Agents
- Introduction
- GETGet Agent
- POSTCreate/Edit Agent
- DELDelete Agent
- POSTChat Interact
- POSTConfigure State
- π§ Knowledge Base
- π¬ Conversations
- π Analytics
Workspaces
- GETGet Workspace
- POSTEdit Workspace
- DELDelete Workspace
- πΌ Agency
- π’ Orgs
- π€ Clients
Export Convos
Exports agent conversations
curl --request GET \
--url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/convos/export \
--header 'Authorization: Bearer <token>'
{
"success": true,
"message": "Agent conversations exported successfully",
"data": [
{
"metadata": {
"ID": "<string>",
"userID": "<string>",
"userName": "<string>",
"userEmail": "jsmith@example.com",
"userImage": "<string>",
"userPhone": "<string>",
"userBrowser": "<string>",
"userProfilePic": "<string>",
"origin": "web-chat",
"messagesNum": 123,
"interactionsNum": 123,
"ts": 123,
"tags": [
"<string>"
],
"convoTimeSeconds": 123,
"firstMessageTS": 123,
"lastMessageTS": 123,
"userPlatform": "<string>",
"state": "requested_chat",
"chatAssignedTo": "<string>",
"lastModified": 123,
"sessionsNum": 123
},
"turns": [
{
"from": "human",
"messages": [
{
"type": "launch",
"payload": {},
"ts": "<string>"
}
]
}
]
}
]
}
Authorizations
Agent/Workspace secret API key as bearer token.
Path Parameters
The ID of the agent to export its conversations
Query Parameters
Page of the results to return, default is 1, query per page is 20
The ids of the conversations to export (comma separated)
Example:
test_id_1,test_id_2,test_id_3
Response
Array of conversations objects
Conversation metadata
ID of the conversation.
User ID.
User's name.
User's email address.
URL to user's profile image.
User's phone number.
User's browser information.
URL to user's profile picture.
Channel origin of the message.
web-chat
, whatsapp
, discord
, gb-chat
Number of messages in the conversation.
Number of interactions in the conversation.
Timestamp of the conversation.
Tags associated with the conversation.
Duration of the conversation in seconds.
Timestamp of the first message.
Timestamp of the last message.
User's platform (e.g., mobile, desktop).
Type of action to perform, launch type doesn't require a payload
requested_chat
, human-chatting
, ai-chatting
, ended_chat
ID of the human agent (client_id) assigned to the conversation.
Timestamp of the last modification.
Number of sessions in the conversation.
Array of turns in the conversation between bot - human.
Message sender whether it's a human or a bot
human
, bot
Array containing the messages of the turn with its type, payload and timestamp.
Type of the message.
launch
, text
, choice
, MultiSelect
, cardV2
, carousel
, visual
, GetBrowserData
, Embed
, iFrame
, FileUpload
, GoogleForm
, EmailForm
, SetConvoData
, VoiceNote
, SetRuntime
, no-reply
, VGVF_Channel
, VFVG_Channel
, VG_Response
, knowledgeBase
, jsx
, info:default
, info:success
, info:danger
, info:primary
, end
Relevant data of the message according to the message type.
Timestamp of the message.
curl --request GET \
--url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/convos/export \
--header 'Authorization: Bearer <token>'
{
"success": true,
"message": "Agent conversations exported successfully",
"data": [
{
"metadata": {
"ID": "<string>",
"userID": "<string>",
"userName": "<string>",
"userEmail": "jsmith@example.com",
"userImage": "<string>",
"userPhone": "<string>",
"userBrowser": "<string>",
"userProfilePic": "<string>",
"origin": "web-chat",
"messagesNum": 123,
"interactionsNum": 123,
"ts": 123,
"tags": [
"<string>"
],
"convoTimeSeconds": 123,
"firstMessageTS": 123,
"lastMessageTS": 123,
"userPlatform": "<string>",
"state": "requested_chat",
"chatAssignedTo": "<string>",
"lastModified": 123,
"sessionsNum": 123
},
"turns": [
{
"from": "human",
"messages": [
{
"type": "launch",
"payload": {},
"ts": "<string>"
}
]
}
]
}
]
}