Restore the full conversation and document state for a previous session.
Returns complete message history (user and AI), final document HTML with chunk IDs preserved, attachment list, and editor actions (font, color, alignment changes). Use to continue editing a document you started in a prior session. The AI rehydrates with full context of all prior decisions, chunk IDs, and attachments. Pass include_document_html=false to skip the full document body when you only need the conversation.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Query Parameters
Durable id of the document to focus on restore (e.g. the file the user clicked in the Files view). When set, that document is shown in the editor and marked focused in the roster; omit to use the session's own last-focused document.
When false, omit the restored document's full HTML body (document_state.html_content) to keep your context small — agents that just need the conversation + metadata should set false. Default true (the web app needs the body to re-render the editor).
Response
Successful Response
Conversation history with document state and restoration instructions.
Session identifier.
Ordered list of messages. Each item has: id (string), sender ('user' or 'ai'), content (string), timestamp (ISO 8601), turn_index (int), checkpoint_id (string or null — present on turns recorded after the revertability feature shipped; null for legacy turns where revert is unavailable).
Current document state. Present if the session has an active document.
Client instruction: 'update' (load document_state HTML into editor), 'clear' (reset editor), or 'keep' (no change).

