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
| Name | Description |
|---|---|
Authorization | The JWT token to authenticate the request. Example: Bearer your-jwt-token |
X-App-Id | The Convert App-ID from the Convert settings page: https://cloud.tiptap.dev/v2/cloud/convert |
Content-Type | Must be application/json |
Body
| Name | Type | Description | Required |
|---|---|---|---|
doc | String | Tiptap JSON document as a string | Yes |
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
| Status | Code | Description |
|---|---|---|
| 400 | NO_DOCUMENT_PROVIDED | No document was provided in the body |
| 422 | FAILED_TO_PARSE_JSON_INPUT | Failed to parse JSON inputs |
| 422 | FAILED_TO_PARSE_MARKDOWN_FILE | Failed to export Markdown |