Export Markdown via REST API

Available in Start planBetav2.12.0

The Markdown export API converts Tiptap JSON documents into Markdown files.

Review the postman collection

You can also experiment with the Document Conversion API by heading over to our Postman Collection.

Export Markdown

POST /v2/convert/export/markdown

The /v2/convert/export/markdown endpoint converts Tiptap JSON documents into Markdown format. Send a POST request with your document as a JSON body to receive a downloadable Markdown file.

Example (cURL)

curl --output document.md -X POST "https://api.tiptap.dev/v2/convert/export/markdown" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "X-App-Id: YOUR_APP_ID" \
    -H "Content-Type: application/json" \
    -d '{
      "doc": "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Hello from Tiptap!\"}]}]}"
    }'

Subscription required

This endpoint requires a valid Tiptap subscription. For more details review our pricing page.

Required headers

NameDescription
AuthorizationThe JWT token to authenticate the request. Example: Bearer your-jwt-token
X-App-IdThe Convert App-ID from the Convert settings page: https://cloud.tiptap.dev/v2/cloud/convert
Content-TypeMust be application/json

Body

NameTypeDescriptionRequired
docStringTiptap JSON document as a stringYes

Response

On success the API returns the Markdown file as a text download:

  • Status: 200 OK
  • Content-Type: text/markdown; charset=utf-8
  • Content-Disposition: attachment; filename=export-{timestamp}.md

Error responses

StatusCodeDescription
400NO_DOCUMENT_PROVIDEDNo document was provided in the body
422FAILED_TO_PARSE_JSON_INPUTFailed to parse JSON inputs
422FAILED_TO_PARSE_MARKDOWN_FILEFailed to export Markdown

Support & Limitations

The REST API uses the same Markdown conversion as the editor extension, so the supported feature set is identical. Markdown export converts Tiptap content to CommonMark-compatible Markdown. Unlike DOCX, Markdown has no concept of rich styling, page layout, or complex table formatting.

FeatureSupport
Text content✓ Paragraphs, headings (1–6), hard breaks
Inline formatting✓ Bold, italic, strikethrough, inline code
Block elements✓ Blockquotes, code blocks (fenced with language), horizontal rules
Lists✓ Bullet lists, ordered lists, task lists, nested lists
Tables✓ Basic pipe-syntax tables (single header row, no merged cells)
Links✓ Hyperlinks with text and URL
Images✓ Image references with alt text (no dimensions)
Underline✓ Custom syntax (++text++, non-standard)
Highlight✓ Custom syntax (==text==, non-standard)
Text color / Font✗ No Markdown syntax for colors, font family, or font size
Text alignment✗ No Markdown syntax
Spacing / Indentation✗ No Markdown syntax
Merged cells✗ Markdown tables don't support colspan or rowspan
Headers & Footers✗ No concept in Markdown
Page layout✗ No page breaks, sections, or page size
Math~ Extension-dependent ($...$ syntax if math extension is configured)
Footnotes & Endnotes✗ Not supported in CommonMark

For the full DOCX feature comparison, see the Supported features matrix.