Rewinds a chat session to the state immediately before a specific user message. The document, conversation history, and supporting context all snap back to that point. The text of the reverted message is returned (compose_text) so the caller can edit and resend it. Messages from the reverted turn forward are soft-archived: hidden from active reads but retained in the database for audit. The original conversation branch is preserved server-side; the new branch becomes the active timeline. Rejects with 409 if the session has a chat job in progress or awaiting approval — wait for the job to settle before reverting. Returns 422 if the message predates the revertability feature (no checkpoint marker).
Documentation Index
Fetch the complete documentation index at: https://docs.superdocs.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Rewind a chat session to the state immediately before a specific user message.
Turn index of the user message to revert. The text of that message is returned in compose_text so the caller can re-edit and resend it. Every chat row at this turn or later is soft-archived (kept in the database for analysis but hidden from active reads).
x >= 0Successful Response
Result of a session revert: restored document state and compose-box prefill.
Session identifier.
Turn index that the active conversation now ends at (the AI reply preceding the reverted user message). -1 when the session is reset to its initial empty state (revert from the very first user message).
The text of the user message that was reverted. Frontends should pre-fill the compose box with this so the user can edit and resend.
Number of chat rows soft-archived by this revert (turns hidden from the UI but retained in the database).
Restored document state. Null when the session is reset to empty.
Frontend instruction: 'update' to load the restored document, or 'clear' to reset the editor to empty.