unsupported_format
HTTP status: 422 Unprocessable Content · Charged: no
What it means
Section titled “What it means”POST /v1/md/format formats plain Markdown. The document you sent is MDX: it has import or export lines, a JSX component such as <Card> or <>, or an MDX comment {/* … */} at the top level of the document. Formatting MDX with Markdown rules rewrites that code (for example, two '~/path' imports in one paragraph become '~~/path'), so the API refuses instead. kind is mdx and line is the first line that looks like MDX, counted from the first line of the document. Code inside fenced code blocks never triggers this error.
What to do
Section titled “What to do”- Format only
.mdfiles. ThemdscribeCLI already skips.mdxfiles in a folder and says so. - If the file is plain Markdown that happens to start a paragraph with
importorexport, put that text in a code block or quote it. - The other operations (
frontmatter,toc,lint,mermaid) still accept the document as it is.
Example response
Section titled “Example response”Captured from the production API on 2026-10-22, sending an MDX page whose first import is on line 4, right after the frontmatter.
{ "error": "unsupported_format", "hint": "This document is MDX (it has JSX or import/export lines). Formatting MDX as Markdown would change your code, so we don't format it. Format plain Markdown files only.", "kind": "mdx", "line": 4, "docs_url": "https://docs.markdownscribe.com/errors/unsupported_format", "request_id": "01M5JKHVZNV10KYF29YCM66TJD"}Related
Section titled “Related”- validation: the request body itself is the wrong shape.
- invalid_frontmatter: the YAML frontmatter does not parse.