Skip to content

Delete Document

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.
document_id
required
Document Id

Document ID

string

Document ID

Successful Response

Response Delete Document Api Writing Documents Document Id Delete
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