Get Session Transcript
GET/api/widget/logs/:session_id/transcript
Get full transcript for a widget session. Returns the transcript in both plain text and structured message format with timestamps.
Query Parameters: include: Optional. Set to 'nodes' to get organized timeline with stage grouping.
Default response: { "messages": [{"role": "user", "content": "...", "start_sec": 0, "end_sec": 1.5}, ...], "tool_calls": [...], "metadata": {"call_start_epoch": ..., "total_duration_sec": ..., "format_version": 1} }
With include=nodes: { "nodes": [...], // Events organized by workflow stage (includes messages) "duration": 62.5, // Total session duration "tool_summary": {...}, // Tool execution statistics ... }
Performance: Checks Redis cache first (24-hour TTL), falls back to database. Uses TranscriptStore for consistent format across phone and widget logs.
Request
Responses
- 200
- 422
Successful Response
Validation Error