---
title: "Convert Markdown via REST API"
description: "Learn how to handle Markdown files in a Tiptap editor, including in-editor import/export and REST API usage."
---

> [Tiptap Editor 3.0 is out. Start here](https://tiptap.dev/docs/resources/whats-new.md)

# Convert Markdown via REST API

Learn how to handle Markdown files in a Tiptap editor, including in-editor import/export and REST API usage.

Tags: Available in Start plan, Beta

## Requirements

**1. Activate trial or subscribe**

Start a [free trial](https://cloud.tiptap.dev/v2?trial=true) or [subscribe to the Start plan](https://cloud.tiptap.dev/v2/billing) in your account.

**2. Configure Convert app**

In case you want to integrate the REST API retrieve your App ID and Convert secret from [your dashboard](https://cloud.tiptap.dev/v2/cloud/convert).

**3. Install from private registry**

To install the frontend extensions, authenticate to Tiptap’s private npm registry by following the [setup guide](https://tiptap.dev/docs/v2/guides/pro-extensions.md).

> **Use Postman**
>
> Experiment with the Conversion API in our <a href="https://www.postman.com/docking-module-explorer-14290287/workspace/tiptap-collaboration-public/collection/33042171-cc186a66-df41-4df8-9c6e-e91b20deffe5?action=share&creator=32651125">Postman collection</a>.

## Import API endpoint
`POST /import`

Converts .md files (or gfm) to Tiptap JSON.

```bash
curl -X POST "https://api.tiptap.dev/v1/convert/import?format=md" \
  -H "Authorization: Bearer <your-jwt-token>" \
  -H "X-App-Id: <your-app-id>" \
  -F "file=@/path/to/file.md"
```

### Import API Headers
| Header          | Description                                                                                                |
|-----------------|------------------------------------------------------------------------------------------------------------|
| `Authorization` | `Bearer <your-jwt-token>`                                                                                  |
| `X-App-Id`      | Convert App ID from [https://cloud.tiptap.dev/convert-settings](https://cloud.tiptap.dev/convert-settings) |

### Import API Fields
| Field                    | Description                                                                        |
|--------------------------|------------------------------------------------------------------------------------|
| `file`                   | The markdown file to convert                                                       |
| `imageUploadCallbackUrl` | Optional endpoint for handling images if the markdown file references local images |

## Export API endpoint
`POST /export`

Converts Tiptap JSON to .md or .gfm.

```bash
curl -X POST "https://api.tiptap.dev/v1/convert/export" \
  -H "Authorization: Bearer <your-jwt-token>" \
  -H "X-App-Id: <your-app-id>" \
  -H "Content-Type: application/json" \
  -d '{"content":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Hello from Tiptap!"}]}]},"format":"md"}' \
  --output document.md
```

#### Export API Headers
| Header          | Description                                                                                                |
|-----------------|------------------------------------------------------------------------------------------------------------|
| `Authorization` | `Bearer <your-jwt-token>`                                                                                  |
| `X-App-Id`      | Convert App ID from [https://cloud.tiptap.dev/convert-settings](https://cloud.tiptap.dev/convert-settings) |

#### Export API Fields
| Field     | Description                                               |
|-----------|-----------------------------------------------------------|
| `content` | Tiptap JSON content                                       |
| `format`  | Target format, `md` or `gfm` for GitHub Flavored Markdown |
