API Documentation
Integrate markdown publishing into your applications
Base URL
https://mdpub-ui-5edusjj7.manus.space/api/trpcAuthentication
No authentication required. The API is publicly accessible.
Request Body
titlestring (required, max 500 chars)contentstring (required, markdown format)Response
{
"result": {
"data": {
"shareId": "abc123xyz456"
}
}
}Use the shareId to construct URLs:
• Share URL (for social media): https://mdpub-ui-5edusjj7.manus.space/api/preview/{shareId}
• Direct URL (for browsers): https://mdpub-ui-5edusjj7.manus.space/d/{shareId}
Returns an HTML page with Open Graph meta tags for social media sharing. When shared on WhatsApp, Twitter, Slack, etc., this URL displays a rich preview with the document title, description, and preview image.
Behavior
- Returns HTML with og:title, og:description, og:image tags
- Automatically redirects to /d/{shareId} for viewing
- Use this URL when sharing on social media
Generates a dynamic preview image (1200x630px PNG) for the document, showing the title and content excerpt. Used automatically by social media platforms when the preview URL is shared.
Response
Content-Type: image/pngReturns a 1200x630 PNG image
curl -X POST https://mdpub-ui-5edusjj7.manus.space/api/trpc/document.create \
-H "Content-Type: application/json" \
-d '{
"title": "My Document Title",
"content": "# Hello World\n\nThis is **markdown** content."
}'import requests
url = "https://mdpub-ui-5edusjj7.manus.space/api/trpc/document.create"
payload = {
"title": "My Document Title",
"content": "# Hello World\n\nThis is **markdown** content."
}
response = requests.post(url, json=payload)
data = response.json()
share_id = data["result"]["data"]["shareId"]
# Use preview URL for social media sharing (proper OG tags)
share_url = f"https://mdpub-ui-5edusjj7.manus.space/api/preview/{share_id}"
# Direct URL (for browsers)
direct_url = f"https://mdpub-ui-5edusjj7.manus.space/d/{share_id}"
print(f"Share URL: {share_url}")const response = await fetch("https://mdpub-ui-5edusjj7.manus.space/api/trpc/document.create", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "My Document Title",
content: "# Hello World\n\nThis is **markdown** content.",
}),
});
const data = await response.json();
const shareId = data.result.data.shareId;
// Use preview URL for social media sharing (proper OG tags)
const shareUrl = `https://mdpub-ui-5edusjj7.manus.space/api/preview/${shareId}`;
// Direct URL (for browsers)
const directUrl = `https://mdpub-ui-5edusjj7.manus.space/d/${shareId}`;
console.log("Share URL:", shareUrl);400 Bad RequestMissing or invalid title/content fields
500 Internal Server ErrorServer-side error during document creation
Currently, there are no enforced rate limits. However, please use the API responsibly and avoid excessive requests that could impact service availability.