Docs API: batchUpdate fails on native Markdown files (“must not be an Office file”)

Since the October 2026 rollout, Google Docs opens and comments .md files natively. With the Docs API, documents.get works on these files: it returns the content and the comments. But documents.batchUpdate fails, even with a simple replaceAllText:

This operation is not supported for this document. The document must not be an Office file.

Is write support for native Markdown files planned? Is there a recommended way to edit them programmatically while keeping comments anchored?

Context: today the only workaround is to rewrite the raw .md. Docs stores comments in the file itself, as markers plus a gdoc_comments: block at the end. A single line written after that block makes every comment disappear. We keep product specs in Markdown and update them with scripts and AI agents, so a safe edit API would make this much more reliable.


Google just added native Markdown support to the Google Docs web app a few days ago (Oct 5th). But they have yet to announce a timeline for updating the Google REST API with the same capabilities.

Google Workspace REST APIs typically lag behind their corresponding web apps when it comes to feature parity, so it might be while before we get full write support for Markdown files via the Google Docs REST API.

However, you might be able to exert some influence by creating a feature request on Google’s Issue Tracker. Issues with a high number of upvotes are more likely to grab Google’s attention as something that needs to be addressed.

Speaking of which, I have a few feature requests of my own related to the Google Docs API, which could use the support:

If you decide to create a feature request of your own, post it here and folks who want to see it implemented will likely upvote it. I most certainly would.

I’m encountering the same limitation with Markdown files stored in Google Drive.

While documents.get works, documents.batchUpdate fails with HTTP 400 (FAILED_PRECONDITION) when attempting a targeted edit.

My current workaround is to read the entire .md file, generate a complete replacement, upload it using files.update, and verify the result. This seems unnecessarily complex for simple changes and introduces performance, reliability, and concurrency concerns.

This limitation is significant enough that I’m evaluating alternatives like Notion, which supports more granular API updates. I’d prefer to stay with Google Drive for its Markdown portability and local synchronization.

A few questions for the Google team:

  1. Is this an intentional API limitation, or is incremental Markdown editing planned?
  2. Is there a better supported workaround I’m overlooking?
  3. If support is planned, is there an estimated timeline or public issue I can follow?

Google’s recent native Markdown editing support is encouraging, so I’m hoping this is simply a capability that hasn’t reached the API yet. Thanks!