Skip to content

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.

document_id
required
Document Id

Document ID to recover

string

Document ID to recover

Successful Response

SaveDocumentResponse

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
documentId
required
Documentid
string
title
required
Title
string
content
required
Content
string
documentType
required
Documenttype
string
tags
required
Tags
Array<string>
wordCount
required
Wordcount
integer
filePath
required
Filepath
string
modifiedAt
required
Modifiedat
integer
outcome
required
Outcome
string
Allowed values: created updated
metadataCommitted
required
Metadatacommitted
boolean

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object