Delete Document
DELETE /api/writing/documents/{document_id}
DELETE
/api/writing/documents/{document_id}
ποΈ Move a document to the Trash (soft-delete).
Flips the docβs status to 'trashed' and stamps deleted_at
so the Trash view can sort by discard order. The .docx on disk and
ChromaDB vectors are left intact β a restore is a pure metadata
flip. Permanent deletion lives at
DELETE /documents/{id}/permanent.
Returns: the trashed document id + timestamp so the frontend can update its local cache without re-fetching.
Raises:
HTTPException 404: If document not found.
Parameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters β document_id
required
Document Id
Document ID
string
Document ID
Responses
Section titled β Responses βSuccessful Response
Response Delete Document Api Writing Documents Document Id Delete
object
key
additional properties
any
Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context