Accept Autorecover
POST /api/writing/autorecover/{document_id}/accept
Restore an autorecover file as the main document.
Reads the .asd bytes byte-identically and writes them over the main .docx via WritingDocumentStore.save_bytes. Deletes the .asd on success so the same recovery doesn’t re-prompt.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Document ID to recover
Document ID to recover
Responses
Section titled “ Responses ”Successful Response
Response body for the unified save endpoint.
Always returned with HTTP 200 for both create and update successes.
The metadata_committed flag distinguishes a fully committed save
from a successful disk write where the SQLite metadata update lagged
(the reconciler will repair the latter on its next pass).
Fields:
document_id: ID of the saved document.
title: Saved title.
content: Saved TipTap HTML, echoed back so the client doesn’t need
to round-trip through a load.
document_type: Saved document type.
tags: Saved tag list.
word_count: Word count derived from the parsed block list (no
disk re-read).
file_path: Absolute path to the on-disk .docx file.
modified_at: Modification timestamp in milliseconds since epoch.
outcome: "created" or "updated".
metadata_committed: True if SQLite metadata write succeeded; False
if disk write succeeded but metadata update lagged. The save
is durable in either case.
object
Validation Error