API
All endpoints are under https://markdown.page/api/.
Publish a page
POST /api/publish
Send markdown in the request body and get back a permanent URL. Set the Content-Type header to text/markdown or text/plain. The body is the raw markdown string, up to 100 KB.
Returns 201 with JSON containing slug and url:
{
"slug": "a3x9k2b7",
"url": "https://markdown.page/a3x9k2b7"
}
Returns 400 if the body is empty, too large, or contains invalid markdown. Returns 415 for unsupported content types. Returns 429 if you exceed 20 requests per 60 seconds.
Example
curl -X POST https://markdown.page/api/publish \
-H "Content-Type: text/markdown" \
-d "# Hello world"
Get raw markdown
GET /{slug}/raw
Returns the original markdown source for a published page as text/plain; charset=utf-8. Returns 404 if the page doesn't exist.
Example
curl https://markdown.page/a3x9k2b7/raw
Markdown rules
Standard markdown plus GFM: headings, bold, italic, strikethrough, lists, task lists, links, images, inline code, fenced code blocks, blockquotes, and tables. Images must use https:// or http:// URLs. Links support https://, http://, and mailto:. Raw HTML, custom CSS, and JavaScript are not accepted. Max document size is 100 KB.