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
| Destination | Value | Description |
|---|---|---|
| Google Docs | google-docs | Styled HTML with inline styles that paste cleanly into Google Docs |
| Word | word | HTML with Microsoft Office XML compatibility for Word |
| Slack | slack | Slack-compatible mrkdwn formatting |
| OneNote | onenote | HTML optimized for OneNote's rendering engine |
email | Inline-styled HTML for email clients | |
| Plain Text | plain-text | Clean plain text with no formatting |
| Generic | generic | Standard 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
- API Reference: Convert: Full endpoint documentation
- Working with Templates: Choose the right template for your content