Export Markdown via REST API

Available in Start planBetav2.8.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