API v1 — Free & Open

Convert Markdown to Office documents via API

Integrate Markpresso into your scripts, CI/CD pipelines, or applications. Simple REST API — send Markdown, get back .docx or .pptx files.

Quick Start

Generate a Word document with cURL:

bash
curl -X POST https://markpresso.pro/api/v1/convert/docx \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Hello World\n\nThis is **Markpresso**.",
    "title": "My Document"
  }' \
  -o my-document.docx

Generate a PowerPoint presentation:

bash
curl -X POST https://markpresso.pro/api/v1/convert/pptx \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Slide 1\n\n## Key Points\n\n- Point A\n- Point B",
    "title": "My Presentation"
  }' \
  -o my-presentation.pptx

Base URL

text
https://markpresso.pro/api/v1

All endpoints accept POST requests with Content-Type: application/json. CORS is enabled for all origins.

Endpoints

POST/api/v1/convert/docx

Convert Markdown to Word (.docx) document

Request Body (JSON)

FieldTypeRequiredDescription
markdownstringYesMarkdown content to convert
titlestringNoDocument title (default: "Document")
style.primaryColorstringNoHex color (default: #D92027)
style.fontHeadingstringNoHeading font (default: Arial)
style.fontBodystringNoBody font (default: Arial)
style.companyNamestringNoCompany name for footer

Response

Binary .docx file with Content-Disposition: attachment

Example with custom style

bash
curl -X POST https://markpresso.pro/api/v1/convert/docx \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Quarterly Report\n\n## Revenue\n\n| Q1 | Q2 | Q3 |\n|---|---|---|\n| 100k | 150k | 200k |",
    "title": "Q3 Report",
    "style": {
      "primaryColor": "#1E40AF",
      "fontHeading": "Georgia",
      "fontBody": "Calibri",
      "companyName": "Acme Corp"
    }
  }' \
  -o report.docx
POST/api/v1/convert/pptx

Convert Markdown to PowerPoint (.pptx) presentation

Request Body (JSON)

FieldTypeRequiredDescription
markdownstringYesMarkdown content to convert
titlestringNoPresentation title (default: "Presentation")
style.primaryColorstringNoHex color for slides
style.fontHeadingstringNoHeading font
style.fontBodystringNoBody font
style.companyNamestringNoCompany name

Example

bash
curl -X POST https://markpresso.pro/api/v1/convert/pptx \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Welcome\n\n## Agenda\n\n- Introduction\n- Demo\n- Q&A\n\n## Thank You\n\nContact: hello@acme.com",
    "title": "Team Meeting",
    "style": {
      "primaryColor": "#7C3AED",
      "companyName": "Acme Corp"
    }
  }' \
  -o meeting.pptx

Code Examples

Python

python
import requests

response = requests.post(
    "https://markpresso.pro/api/v1/convert/docx",
    json={
        "markdown": "# My Report\n\n## Summary\n\nThis is a **test** document.",
        "title": "Report",
        "style": {
            "primaryColor": "#1E40AF",
            "companyName": "My Company"
        }
    }
)

with open("report.docx", "wb") as f:
    f.write(response.content)

print("Document saved!")

JavaScript / Node.js

javascript
const response = await fetch("https://markpresso.pro/api/v1/convert/docx", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    markdown: "# Hello\n\nGenerated via **Markpresso API**.",
    title: "API Test",
    style: { primaryColor: "#059669" }
  })
});

const blob = await response.blob();
// In Node.js:
// const fs = require("fs");
// fs.writeFileSync("output.docx", Buffer.from(await response.arrayBuffer()));

Bash — Batch convert multiple files

bash
#!/bin/bash
# Convert all .md files in a folder to .docx

for file in docs/*.md; do
  name=$(basename "$file" .md)
  echo "Converting $name..."
  curl -s -X POST https://markpresso.pro/api/v1/convert/docx \
    -H "Content-Type: application/json" \
    -d "{\"markdown\": $(jq -Rs . < "$file"), \"title\": \"$name\"}" \
    -o "output/$name.docx"
done

echo "Done! All documents saved to output/"

PHP

php
<?php
$ch = curl_init("https://markpresso.pro/api/v1/convert/docx");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode([
        "markdown" => "# Invoice\n\n| Item | Price |\n|------|-------|\n| Service A | 500€ |",
        "title" => "Invoice",
        "style" => ["primaryColor" => "#000000", "companyName" => "My Corp"]
    ])
]);

$result = curl_exec($ch);
curl_close($ch);
file_put_contents("invoice.docx", $result);
echo "Invoice generated!\n";

Error Handling

StatusMeaningResponse
200SuccessBinary .docx or .pptx file
400Bad Request{"error": "Missing required field: markdown"}
500Server Error{"error": "Conversion failed", "details": "..."}