docs_update_document
Edit a document (.docx) in Files from Markdown (same Markdown as docs_create_document). mode='replace' rewrites the whole body (the page setup, styles, header and footer stay; formatting Markdown can't express is reset — read it first with docs_read_document). Keep the  placeholders from docs_read_document where pictures should stay (move one to move the picture, change the alt text in the brackets, leave it out to remove the picture); new pictures can't be added from Markdown. mode='append' adds the Markdown at the end and leaves everything already there untouched. Saves a NEW version (restorable from Versions in the editor). Pass expected_version (from docs_read_document) so the edit is refused if someone changed the file since you read it.
Parameters
- file_id (string, required)
- markdown (string, required)
- mode (string, default "replace")
- expected_version (integer)