Upload Markdown documents, images, and videos via API. Get beautifully rendered public URLs instantly.
# Upload a document
curl -X POST https://docshare-production.up.railway.app/api/documents \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_KEY" \
-d '{
"markdown": "# Hello World\n\nYour content here.",
"title": "My Document",
"slug": "my-doc",
"visibility": "unlisted"
}'
visibility: public | unlisted (default) | password · Add password field for protected content.
{
"slug": "my-doc",
"title": "My Document",
"url": "https://docshare-production.up.railway.app/d/my-doc",
"created_at": "2026-03-21T..."
}List all documents. Supports ?limit=50&offset=0
Delete a document by slug.
# Upload an image or video
curl -X POST https://docshare-production.up.railway.app/api/media \
-H "x-api-key: YOUR_KEY" \
-F "file=@photo.jpg" \
-F "slug=my-photo" \
-F "visibility=unlisted"
Supports visibility (public/unlisted/password) and password fields. Videos hosted via Bunny CDN Stream.
{
"slug": "my-photo",
"url": "https://docshare-production.up.railway.app/m/my-photo",
"raw_url": "https://docshare-production.up.railway.app/m/my-photo/raw",
"thumb_url": "https://docshare-production.up.railway.app/m/my-photo/thumb"
}List all media. Supports ?limit=50&offset=0&type=image|video
Delete a media file by slug.