Skip to main content
GET
/
v1
/
sessions
/
{session_id}
/
history
Get Session History
curl --request GET \
  --url https://api.superdocs.app/v1/sessions/{session_id}/history \
  --header 'Authorization: Bearer <token>'
{
  "session_id": "<string>",
  "messages": [
    {}
  ],
  "document_state": {
    "html_content": "<string>",
    "version_id": "<string>",
    "chunk_count": 0,
    "last_modified": "<string>",
    "attachments": [
      {}
    ]
  },
  "editor_action": "keep"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Path Parameters

session_id
string
required

Response

Successful Response

Conversation history with document state and restoration instructions.

session_id
string
required

Session identifier.

messages
Messages · object[]
required

Ordered list of messages. Each item has: id (string), sender ('user' or 'ai'), content (string), timestamp (ISO 8601), turn_index (int).

document_state
DocumentState · object

Current document state. Present if the session has an active document.

editor_action
string
default:keep

Frontend instruction: 'update' (load document_state HTML into editor), 'clear' (reset editor), or 'keep' (no change).