Export Single Conversation
curl --request GET \
--url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export', 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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"userEmail": "<string>",
"userName": "<string>",
"userPhone": "<string>",
"userAddress": "<string>",
"userCompany": "<string>",
"userWebsite": "<string>",
"notes": "<string>",
"userProfilePic": "<string>",
"stage": "new",
"value": 123,
"currency": "<string>",
"expectedCloseDate": "<string>",
"subIndustry": "<string>",
"source": "<string>",
"language": "<string>",
"linkedIn": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"demoDate": "<string>",
"demoTime": "<string>",
"demoLink": "<string>",
"lostReason": "<string>",
"lastActivityDate": "<string>",
"ID": "<string>",
"userID": "<string>",
"campaignId": "<string>",
"userImage": "<string>",
"socialHandle": "<string>",
"isFollowingBusiness": true,
"socialVerified": true,
"userOs": "<string>",
"userBrowser": "<string>",
"ipAddress": "<string>",
"browserTimezone": "<string>",
"countryCode": "<string>",
"origin": "<unknown>",
"whatsappPhoneNumberId": "<string>",
"whatsappBusinessNumber": "<string>",
"whatsappDisplayPhoneNumber": "<string>",
"whatsappBusinessAccountId": "<string>",
"voiceflowV4Session": {
"sessionKey": "<string>",
"projectId": "<string>",
"environmentAlias": "<string>",
"updatedAt": 123,
"resolvedRuntime": "legacy"
},
"messagesNum": 123,
"interactionsNum": 123,
"ts": 123,
"tags": [
"<string>"
],
"convoTimeSeconds": 123,
"firstMessageTS": 123,
"lastMessageTS": 123,
"userPlatform": "<string>",
"state": "requested_chat",
"smbContact": true,
"smbContactName": "<string>",
"smbContactRemovedAt": 123,
"smbLastSeenAt": 123,
"humanClaimedAt": 123,
"humanLastRepliedAt": 123,
"pendingAiReplyAt": 123,
"chatAssignedTo": "<string>",
"chatAssignedToIds": [
"<string>"
],
"assignedToUsers": [
{
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"photoUrl": "<string>",
"note": "<string>",
"assignedAt": "<string>",
"status": "pending"
}
],
"handoffHistory": [
{
"requestedAt": 123,
"acceptedAt": 123,
"completedAt": 123,
"acceptedBy": "<string>",
"organizationId": "<string>",
"requestedTeamKey": "<string>",
"teamIds": [
"<string>"
],
"teamKeys": [
"<string>"
]
}
],
"isTyping": true,
"lastModified": 123,
"sessionsNum": 123,
"lang": "<string>",
"vapi": {
"cost": 123,
"callDuration": 123,
"recordingUrl": "<string>",
"syncRecordingUrl": "<string>",
"callerPhoneNumber": "<string>",
"calleePhoneNumber": "<string>",
"callStatus": "<string>",
"callError": "<string>"
},
"ratingFrom5": 123,
"totalUserInteractions": 123,
"isBlocked": true,
"nodesInfo": {
"currentNode": "<string>"
},
"capturedVariables": "<unknown>",
"campaignCalls": [
"<unknown>"
],
"sessions": [
"<unknown>"
],
"endReason": "<string>",
"isTest": true,
"metrics": [
"<unknown>"
],
"notifyToUserId": "<string>",
"averageLatency": 123,
"voice": {
"latestSessionId": "<string>",
"listenUrl": "<string>",
"listenUrlUNIX": 123
},
"detailedCost": {
"totalCreditsConsumed": 123,
"speechGenCost": 123,
"transcriberCost": 123,
"twilioCost": 123,
"llmCost": 123
},
"summary": "<string>",
"shortSummary": "<string>",
"requestedTeamKey": "<string>",
"delegatedBy": "<string>",
"delegatedAt": 123,
"lastViewed": 123,
"isArchived": true,
"archivedAt": 123,
"archivedBy": "<string>",
"isResolved": true,
"resolvedAt": 123,
"resolvedBy": "<string>",
"resolvedByEmail": "<string>",
"lastResolvedAssigneeId": "<string>",
"reopenedAt": 123,
"reopenReason": "<string>",
"csat": {
"satisfaction10": 5.5,
"ease10": 5.5,
"comment": "<string>",
"submittedAt": 123,
"channel": "<string>",
"surveyVersion": 123
},
"note": "<string>",
"assignedTo": {
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"photoUrl": "<string>",
"note": "<string>",
"assignedAt": "<string>",
"status": "pending"
},
"hotScore": 123,
"hotLabel": "hot",
"crmActivities": [
{
"type": "Message",
"id": "<string>",
"title": "<string>",
"date": "<string>",
"dueDate": "<string>",
"completed": true,
"responded": true,
"firstChannel": "LinkedIn",
"firstEngaged": true,
"secondChannel": "LinkedIn",
"secondEngaged": true,
"note": "<string>",
"notesHistory": [
{
"text": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"timestamp": "<string>"
}
],
"metadata": {}
}
],
"crmAlerts": {
"overdueECD": true,
"overdueActivity": true,
"staleLead": true,
"responded": true,
"newHandoffAssigned": true
},
"contactIdentityId": "<string>",
"linkedChannels": [
"<string>"
],
"crossChannelContext": "<string>",
"leadScore": 0,
"funnelStepsMatched": [],
"funnelScoreHistory": [],
"funnelNotificationSent": false,
"funnelLastEvaluated": 123,
"funnelExtractedData": {},
"funnelSummary": "<string>",
"tokenUsage": {
"cumulativeInputTokens": 123,
"cumulativeOutputTokens": 123,
"cumulativeTotalTokens": 123,
"cumulativeUsd": 123,
"lastTurnInputTokens": 123,
"lastTurnOutputTokens": 123,
"lastTurnTotalTokens": 123,
"lastTurnUsd": 123,
"lastTurnModelId": "<string>",
"lastTurnContextWindow": 123,
"lastTurnInputUsdPer1k": 123,
"lastTurnOutputUsdPer1k": 123,
"lastTurnTs": 123,
"usagePerModel": {}
},
"inboundEngagementState": {
"firstDecisionAt": 123,
"firstDecisionShouldReply": true,
"lastDecisionAt": 123,
"lastDecisionShouldReply": true,
"lastDecisionReason": "<string>",
"aiOwnedThread": true,
"ignoreThread": true,
"lastTriggeredBy": "phrase"
}
},
"usage": {
"periodKey": "<string>",
"billableUsedThisRequest": 123,
"billableUsedThisPeriod": 123,
"includedQuota": 123,
"billableRemainingThisPeriod": 123,
"overageUsedThisPeriod": 123,
"overagePacksCharged": 123,
"exportRequestCount": 123,
"summary": "<string>",
"logId": "<string>"
},
"rateLimit": {
"requestsPerHour": 123,
"remainingHour": 123
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Conversations
Export Single Conversation
Exports a single conversation for the specified agent in a format suitable for download, using the V3 endpoints.
GET
/
agents
/
{agentId}
/
convos
/
{convoId}
/
export
Export Single Conversation
curl --request GET \
--url https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export', 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://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/convos/{convoId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"userEmail": "<string>",
"userName": "<string>",
"userPhone": "<string>",
"userAddress": "<string>",
"userCompany": "<string>",
"userWebsite": "<string>",
"notes": "<string>",
"userProfilePic": "<string>",
"stage": "new",
"value": 123,
"currency": "<string>",
"expectedCloseDate": "<string>",
"subIndustry": "<string>",
"source": "<string>",
"language": "<string>",
"linkedIn": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"demoDate": "<string>",
"demoTime": "<string>",
"demoLink": "<string>",
"lostReason": "<string>",
"lastActivityDate": "<string>",
"ID": "<string>",
"userID": "<string>",
"campaignId": "<string>",
"userImage": "<string>",
"socialHandle": "<string>",
"isFollowingBusiness": true,
"socialVerified": true,
"userOs": "<string>",
"userBrowser": "<string>",
"ipAddress": "<string>",
"browserTimezone": "<string>",
"countryCode": "<string>",
"origin": "<unknown>",
"whatsappPhoneNumberId": "<string>",
"whatsappBusinessNumber": "<string>",
"whatsappDisplayPhoneNumber": "<string>",
"whatsappBusinessAccountId": "<string>",
"voiceflowV4Session": {
"sessionKey": "<string>",
"projectId": "<string>",
"environmentAlias": "<string>",
"updatedAt": 123,
"resolvedRuntime": "legacy"
},
"messagesNum": 123,
"interactionsNum": 123,
"ts": 123,
"tags": [
"<string>"
],
"convoTimeSeconds": 123,
"firstMessageTS": 123,
"lastMessageTS": 123,
"userPlatform": "<string>",
"state": "requested_chat",
"smbContact": true,
"smbContactName": "<string>",
"smbContactRemovedAt": 123,
"smbLastSeenAt": 123,
"humanClaimedAt": 123,
"humanLastRepliedAt": 123,
"pendingAiReplyAt": 123,
"chatAssignedTo": "<string>",
"chatAssignedToIds": [
"<string>"
],
"assignedToUsers": [
{
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"photoUrl": "<string>",
"note": "<string>",
"assignedAt": "<string>",
"status": "pending"
}
],
"handoffHistory": [
{
"requestedAt": 123,
"acceptedAt": 123,
"completedAt": 123,
"acceptedBy": "<string>",
"organizationId": "<string>",
"requestedTeamKey": "<string>",
"teamIds": [
"<string>"
],
"teamKeys": [
"<string>"
]
}
],
"isTyping": true,
"lastModified": 123,
"sessionsNum": 123,
"lang": "<string>",
"vapi": {
"cost": 123,
"callDuration": 123,
"recordingUrl": "<string>",
"syncRecordingUrl": "<string>",
"callerPhoneNumber": "<string>",
"calleePhoneNumber": "<string>",
"callStatus": "<string>",
"callError": "<string>"
},
"ratingFrom5": 123,
"totalUserInteractions": 123,
"isBlocked": true,
"nodesInfo": {
"currentNode": "<string>"
},
"capturedVariables": "<unknown>",
"campaignCalls": [
"<unknown>"
],
"sessions": [
"<unknown>"
],
"endReason": "<string>",
"isTest": true,
"metrics": [
"<unknown>"
],
"notifyToUserId": "<string>",
"averageLatency": 123,
"voice": {
"latestSessionId": "<string>",
"listenUrl": "<string>",
"listenUrlUNIX": 123
},
"detailedCost": {
"totalCreditsConsumed": 123,
"speechGenCost": 123,
"transcriberCost": 123,
"twilioCost": 123,
"llmCost": 123
},
"summary": "<string>",
"shortSummary": "<string>",
"requestedTeamKey": "<string>",
"delegatedBy": "<string>",
"delegatedAt": 123,
"lastViewed": 123,
"isArchived": true,
"archivedAt": 123,
"archivedBy": "<string>",
"isResolved": true,
"resolvedAt": 123,
"resolvedBy": "<string>",
"resolvedByEmail": "<string>",
"lastResolvedAssigneeId": "<string>",
"reopenedAt": 123,
"reopenReason": "<string>",
"csat": {
"satisfaction10": 5.5,
"ease10": 5.5,
"comment": "<string>",
"submittedAt": 123,
"channel": "<string>",
"surveyVersion": 123
},
"note": "<string>",
"assignedTo": {
"userId": "<string>",
"name": "<string>",
"email": "<string>",
"photoUrl": "<string>",
"note": "<string>",
"assignedAt": "<string>",
"status": "pending"
},
"hotScore": 123,
"hotLabel": "hot",
"crmActivities": [
{
"type": "Message",
"id": "<string>",
"title": "<string>",
"date": "<string>",
"dueDate": "<string>",
"completed": true,
"responded": true,
"firstChannel": "LinkedIn",
"firstEngaged": true,
"secondChannel": "LinkedIn",
"secondEngaged": true,
"note": "<string>",
"notesHistory": [
{
"text": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"timestamp": "<string>"
}
],
"metadata": {}
}
],
"crmAlerts": {
"overdueECD": true,
"overdueActivity": true,
"staleLead": true,
"responded": true,
"newHandoffAssigned": true
},
"contactIdentityId": "<string>",
"linkedChannels": [
"<string>"
],
"crossChannelContext": "<string>",
"leadScore": 0,
"funnelStepsMatched": [],
"funnelScoreHistory": [],
"funnelNotificationSent": false,
"funnelLastEvaluated": 123,
"funnelExtractedData": {},
"funnelSummary": "<string>",
"tokenUsage": {
"cumulativeInputTokens": 123,
"cumulativeOutputTokens": 123,
"cumulativeTotalTokens": 123,
"cumulativeUsd": 123,
"lastTurnInputTokens": 123,
"lastTurnOutputTokens": 123,
"lastTurnTotalTokens": 123,
"lastTurnUsd": 123,
"lastTurnModelId": "<string>",
"lastTurnContextWindow": 123,
"lastTurnInputUsdPer1k": 123,
"lastTurnOutputUsdPer1k": 123,
"lastTurnTs": 123,
"usagePerModel": {}
},
"inboundEngagementState": {
"firstDecisionAt": 123,
"firstDecisionShouldReply": true,
"lastDecisionAt": 123,
"lastDecisionShouldReply": true,
"lastDecisionReason": "<string>",
"aiOwnedThread": true,
"ignoreThread": true,
"lastTriggeredBy": "phrase"
}
},
"usage": {
"periodKey": "<string>",
"billableUsedThisRequest": 123,
"billableUsedThisPeriod": 123,
"includedQuota": 123,
"billableRemainingThisPeriod": 123,
"overageUsedThisPeriod": 123,
"overagePacksCharged": 123,
"exportRequestCount": 123,
"summary": "<string>",
"logId": "<string>"
},
"rateLimit": {
"requestsPerHour": 123,
"remainingHour": 123
}
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Example Response
{
"success": true,
"message": "Conversation exported successfully",
"data": {
"metadata": {
"feedback": "Positive",
"convo": {
"id": "convo123",
"userName": "John Doe",
"userEmail": "john@example.com",
"userPhone": "+1234567890",
"userCompany": "Acme Corp",
"notes": "Customer interested in premium plan, follow up scheduled",
"tags": ["new-lead"],
"origin": "web"
},
"sessions": []
},
"turns": [
{
"from": "user",
"messages": [
{
"type": "text",
"ts": "December 1st 2024, 10:30:00 am",
"payload": {
"message": "Hello!",
"feedback": "Unset",
"aiGenerated": false
}
}
]
},
{
"from": "bot",
"messages": [
{
"type": "text",
"ts": "December 1st 2024, 10:30:02 am",
"payload": {
"message": "Hi! How can I help you today?",
"feedback": "Positive",
"aiGenerated": true
}
}
]
}
]
}
}
Notes
- The conversation must belong to the specified agent
- Includes full turn history with timestamps
- Feedback status indicates user feedback on each message
- All lead fields are included:
userName,userEmail,userPhone,userCompany,userAddress,userWebsite,notes,tags
Related documentation
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
json, csv 