π¬Get Messages
Retrieve all messages from a specific chatlog, including both user messages and bot responses with timestamps.
Endpoint
POST https://app.wonderchat.io/api/v1/messages
Request Parameters
apiKey
string
β Yes
Your API key
chatlogId
string
β Yes
The ID of the chatlog to retrieve messages from
Example Request
curl --location --request POST 'https://app.wonderchat.io/api/v1/messages' \
--header 'Content-Type: application/json' \
--data-raw '{
"apiKey": "YOUR_API_KEY",
"chatlogId": "YOUR_CHATLOG_ID"
}'
Response Format
{
"messages": [
{
"content": "Hello, how can I help you?",
"type": "bot",
"createdAt": "2023-12-01T06:34:38.903Z"
},
{
"content": "I have a question about your product.",
"type": "user",
"createdAt": "2023-12-01T06:35:10.123Z"
},
{
"content": "I'd be happy to help you with product information. What specifically would you like to know?",
"type": "bot",
"createdAt": "2023-12-01T06:35:15.456Z"
}
]
}
Response Fields
messages
array
Array of all messages in the chatlog
messages[].content
string
The text content of the message
messages[].type
string
Message type: "user"
or "bot"
messages[].createdAt
string
ISO timestamp when the message was created
Message Types
user
Message sent by the user/customer
bot
Response generated by the chatbot
Use Cases
Conversation Review: Analyze individual conversations for quality assurance
Context Retrieval: Get full conversation context for support handovers
Training Data: Extract conversations for chatbot training
Audit Trail: Maintain records of customer interactions
Integration: Sync conversation history with CRM or support systems
Analytics: Analyze conversation flow and user behavior patterns
Last updated
Was this helpful?