Get Session History
Changed onRetrieve message history for a specific conversation session.
**Authentication Required**: Bearer token, API key, or session token
**Pagination**:
- Use `limit` and `skip` parameters for pagination
- Messages are returned in **reverse chronological order** (newest first)
- `total_count` indicates total messages in the session
**Summaries** (if available):
- Returns hierarchical conversation summaries (short/medium/long-term)
- Includes `context_for_llm` field with pre-compressed context
- Summaries are automatically generated every 15 messages
- Use `/sessions/{session_id}/compress` endpoint to retrieve on-demand
**Access Control**:
- Only returns messages for the authenticated user
- Workspace scoping is applied if available
Request
- Base URLhttps://memory.papr.ai
- Auth
- API key in header X-API-Key
- or HTTP bearer
Path parameters
Query parameters
Maximum number of messages to return
Number of messages to skip for pagination
Response
Message history retrieved
Example response
{
"context_for_llm": "FULL SESSION: Product planning and strategy conversation\nRECENT (last ~100): Ongoing product planning discussion for Q4\nCURRENT (last 15): User requested help planning Q4 product roadmap",
"messages": [
{
"content": "Can you help me plan the Q4 product roadmap?",
"createdAt": "2024-01-15T10:30:00Z",
"objectId": "msg_abc123",
"processing_status": "completed",
"role": "user",
"sessionId": "session_123"
},
{
"content": "I'd be happy to help you plan your Q4 roadmap. Let's start by identifying your key objectives.",
"createdAt": "2024-01-15T10:31:00Z",
"objectId": "msg_def456",
"processing_status": "completed",
"role": "assistant",
"sessionId": "session_123"
}
],
"sessionId": "session_123",
"summaries": {
"long_term": "Product planning and strategy conversation",
"medium_term": "Ongoing product planning discussion for Q4",
"short_term": "User requested help planning Q4 product roadmap",
"topics": [
"product",
"roadmap",
"planning",
"Q4"
]
},
"total_count": 2
}Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added
subschema #2to the//response propertyanyOflist for the response status - info
removed from the
//response propertyanyOflist for the response status
- info
- warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status
- warning