πExport Chatlogs
Export conversation data from your chatbot(s) for analysis, reporting, or compliance purposes.
Endpoint
POST https://app.wonderchat.io/api/v1/export-chatlogs
Request Parameters
apiKey
string
β Yes
Your API key
chatbotId
string
β No
ID of specific chatbot. If omitted, exports from all chatbots
startDate
string
β No
ISO date string for export start date
endDate
string
β No
ISO date string for export end date
Example Request
curl --location --request POST 'https://app.wonderchat.io/api/v1/export-chatlogs' \
--header 'Content-Type: application/json' \
--data-raw '{
"apiKey": "YOUR_API_KEY",
"chatbotId": "YOUR_CHATBOT_ID",
"startDate": "2023-12-01T06:34:38.903Z",
"endDate": "2023-12-02T06:34:38.903Z"
}'
Response Format
The response includes a chatlogs
array with detailed conversation data:
{
"chatlogs": [
{
"createdAt": "2023-12-01T06:34:38.903Z",
"chatbotId": "clx123abc",
"userEmail": "[email protected]",
"userPhoneNumber": "+1234567890",
"userName": "John Doe",
"countryCode": "US",
"userFeedback": "GOOD",
"averageConfidence": 0.85,
"aiResolutionState": "RESOLVED",
"initialPageUrl": "https://example.com/support",
"messages": [
{
"userMessage": "Hello, I need help",
"botMessage": "Hi! I'm here to help you.",
"createdAt": "2023-12-01T06:34:38.903Z"
}
]
}
]
}
Response Fields
createdAt
string
Timestamp when the chatlog was created
chatbotId
string
ID of the associated chatbot
userEmail
string
User's email address (if provided)
userPhoneNumber
string
User's phone number (if provided)
userName
string
User's name (if provided)
countryCode
string
Country code where chat originated
userFeedback
string
User rating: "GOOD"
, "BAD"
, or null
averageConfidence
number
Chatbot's confidence level (0.0 - 1.0)
aiResolutionState
string
Resolution status: "RESOLVED"
, "UNRESOLVED"
, etc.
initialPageUrl
string
URL where the chat was initiated
messages
array
Array of conversation messages
messages[].userMessage
string
User's message content
messages[].botMessage
string
Bot's response content
messages[].createdAt
string
Message timestamp
Date Filtering
startDate: Only includes chatlogs created on or after this date
endDate: Only includes chatlogs created up to and including this date
No dates: Exports all available chatlogs
Format: Use ISO 8601 format (e.g.,
"2023-12-01T06:34:38.903Z"
)
Use Cases
Analytics: Analyze conversation patterns and user behavior
Compliance: Export data for regulatory requirements
Training: Use conversations to improve chatbot responses
Reporting: Generate customer service reports
Integration: Sync conversation data with CRM systems
Last updated
Was this helpful?