Import Markdown via REST API
Available in Start planBetav2.8.0
The Markdown import API converts .md files into Tiptap JSON format.
Review the postman collection
You can also experiment with the Document Conversion API by heading over to our Postman Collection.
Import Markdown
POST /v2/convert/import/markdown
The /v2/convert/import/markdown endpoint converts Markdown files (.md or .markdown) into Tiptap's JSON format. Upload a file using multipart/form-data.
Example (cURL)
curl -X POST "https://api.tiptap.dev/v2/convert/import/markdown" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-App-Id: YOUR_APP_ID" \
-F "file=@/path/to/file.md"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 |
Body
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The Markdown file to convert (.md or .markdown) |
verbose | string | No | Logging verbosity level (bitmask: 1=log, 2=warn, 4=error) |
Response (200 OK)
{
"data": {
"content": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello from Markdown!"
}
]
}
]
}
},
"logs": []
}Error responses
| Status | Code | Description |
|---|---|---|
| 400 | NO_FILE_PROVIDED | No file was provided |
| 400 | INVALID_FILE_TYPE | File is not .md or .markdown |
| 422 | FAILED_TO_GET_FILE_ARRAY_BUFFER | Failed to read file buffer |
| 500 | FAILED_TO_CONVERT_MARKDOWN_TO_TIPTAP_JSON | Failed to convert Markdown to JSON |