Overview
API endpoint for retrieving conversation history from a channel or session. This endpoint allows you to access previous interactions with your AI.
Authorization
Must be set to application/json
Body
The hyphenated text below the AI’s name when clicked into a Persona.
"DomainName": "product-demo-jebzrhw"
Session identifier to retrieve specific conversation history"SessionId": "dd3ec564-5948-4da0-8ab6-94b23f92705b"
Example Request
Array of conversation messages, including both user messages and AI responses
{
"SessionId": "dd3ec564-5948-4da0-8ab6-94b23f92705b",
"DomainName": "product-demo-jebzrhw"
}
Example Response
[
{
"ai_message": "what is a personal AI",
"ai_score": 0.0,
"ai_name": "AI Name",
"ai_picture": null,
"raw_message": "what is a personal AI",
"timestamp": "2024-09-16T03:52:40.821Z",
"SessionId": "98bf4dd5-5ab0-4d28-a439-d2f2d18d5443",
"Metadata": {}
},
{
"ai_message": "A personal AI is a digital extension of your mind...",
"ai_score": 0.0,
"ai_name": "AI Name",
"ai_picture": null,
"raw_message": "A personal AI is a digital extension of your mind...",
"timestamp": "2024-09-16T03:52:40.822Z",
"SessionId": "98bf4dd5-5ab0-4d28-a439-d2f2d18d5443",
"Metadata": {}
}
]
Example cURL
curl --location 'https://api.personal.ai/v1/conversation' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"SessionId": "dd3ec564-5948-4da0-8ab6-94b23f92705b",
"DomainName": "product-demo-jebzrhw"
}'
Error Codes
Code | Description |
---|
403 | Forbidden - Check that API key is invalid |
404 | Not Found - Conversation or session not found |