API Documentation
Share, update, and delete markdown programmatically. No API key required — an edit token returned at creation authorizes changes to each share.
Create a share
POST /api/share with a JSON body. expiry is one of 1d, 7d, 30d (default), or never.
curl -X POST https://docs-md.com/api/share \
-H "Content-Type: application/json" \
-d '{"content": "# Hello", "filename": "hello.md", "expiry": "never"}'
# Response
{
"success": true,
"id": "misty-fox-a1b2c",
"url": "https://docs-md.com/misty-fox-a1b2c",
"rawUrl": "https://docs-md.com/raw/misty-fox-a1b2c",
"editToken": "…",
"expiresAt": 0
}Save the editToken — it is shown once and is the only way to update or delete the share. expiresAt is a Unix timestamp in milliseconds, or 0 for permanent links.
Read raw markdown
Every share has a raw endpoint that returns plain text/markdown — handy for scripts, CI, and piping into other tools.
curl https://docs-md.com/raw/misty-fox-a1b2cUpdate a share
PATCH /api/share/:id with the edit token in the x-edit-token header. The share URL stays the same.
curl -X PATCH https://docs-md.com/api/share/misty-fox-a1b2c \
-H "Content-Type: application/json" \
-H "x-edit-token: YOUR_EDIT_TOKEN" \
-d '{"content": "# Updated content"}'Delete a share
curl -X DELETE https://docs-md.com/api/share/misty-fox-a1b2c \
-H "x-edit-token: YOUR_EDIT_TOKEN"Limits
- Markdown content up to 120,000 characters per share.
- Rate limit: 20 share operations per minute per IP (30/min for MCP).
- Expired shares and their files are deleted automatically.
MCP server
The same operations are available to AI assistants through our MCP server at https://docs-md.com/api/mcp with tools share_markdown, update_share, and delete_share. See What is MCP for setup instructions.