Converting for Destinations

Convert markdown to Google Docs, Word, Slack, OneNote, Email, or Plain Text format.

Converting for Destinations

The convert endpoint transforms markdown into output optimized for specific destinations. Each destination gets formatting that works correctly when pasted into that application.

Available destinations

DestinationValueDescription
Google Docsgoogle-docsStyled HTML with inline styles that paste cleanly into Google Docs
WordwordHTML with Microsoft Office XML compatibility for Word
SlackslackSlack-compatible mrkdwn formatting
OneNoteonenoteHTML optimized for OneNote's rendering engine
EmailemailInline-styled HTML for email clients
Plain Textplain-textClean plain text with no formatting
GenericgenericStandard styled HTML (default)

Convert markdown

curl -X POST https://api.unmarkdown.com/v1/convert \
  -H "Authorization: Bearer um_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Meeting Notes\n\n## Action Items\n\n- [ ] Review proposal\n- [ ] Schedule follow-up\n\n> [!IMPORTANT]\n> Deadline is Friday.",
    "destination": "google-docs",
    "template_id": "executive"
  }'
const response = await fetch(
  "https://api.unmarkdown.com/v1/convert",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer um_your_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      markdown: "# Meeting Notes\n\n## Action Items\n\n- [ ] Review proposal\n- [ ] Schedule follow-up\n\n> [!IMPORTANT]\n> Deadline is Friday.",
      destination: "google-docs",
      template_id: "executive",
    }),
  }
);

const data = await response.json();
// Copy data.html to clipboard for pasting into Google Docs
import requests

response = requests.post(
    "https://api.unmarkdown.com/v1/convert",
    headers={"Authorization": "Bearer um_your_key_here"},
    json={
        "markdown": "# Meeting Notes\n\n## Action Items\n\n- [ ] Review proposal\n- [ ] Schedule follow-up\n\n> [!IMPORTANT]\n> Deadline is Friday.",
        "destination": "google-docs",
        "template_id": "executive",
    },
)

data = response.json()
print(data["html"])

Response format

The response includes both HTML and plain text versions:

{
  "html": "<div class=\"template-preview\">...</div>",
  "plain_text": "Meeting Notes\n\nAction Items\n\n- Review proposal\n- Schedule follow-up",
  "destination": "google-docs",
  "template_id": "executive",
  "theme_mode": "light"
}

Destination differences

Each destination applies different transformations:

  • Google Docs and Word: Template colors are applied as inline styles on headings, text, links, code blocks, tables, and blockquotes. Fonts are preserved.
  • Slack: Content is converted to Slack's mrkdwn format (*bold*, _italic_, `code`). Complex elements like tables are simplified.
  • OneNote: HTML is optimized for OneNote's rendering engine, including table handling and checkbox styling.
  • Email: All CSS is inlined for compatibility with email clients that strip <style> tags.
  • Plain Text: All formatting is stripped. Headings use text markers, lists use dashes, and links show their URLs.

Template styling

The template_id parameter affects the visual styling applied to the converted output. Template colors influence headings, text, links, code, tables, and blockquotes in destinations that support CSS (Google Docs, Word, Email, OneNote).

For Slack and Plain Text destinations, the template parameter has no visual effect since those formats do not support styled HTML.

Next steps