Skip to content

Get Document

GET
/api/writing/documents/{document_id}

πŸ“„ Get a single document by ID.

Reads content from the .docx file on disk via DocxService, merges with SQLite metadata. Falls back to SQLite content for legacy documents that haven’t been migrated to .docx yet.

Path Parameters:

  • document_id: Unique document identifier

Returns:

  • Document object with content loaded from .docx

Raises:

  • HTTPException 404: If document not found or in the Trash
  • HTTPException 500: If retrieval fails
document_id
required
Document Id

Document ID

string

Document ID

Successful Response

Response Get Document Api Writing Documents Document Id Get
object
key
additional properties
any

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