DocShare

Upload Markdown documents, images, and videos via API. Get beautifully rendered public URLs instantly.

API Reference

POST /api/documents

# 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.

Response:
{ "slug": "my-doc", "title": "My Document", "url": "https://docshare-production.up.railway.app/d/my-doc", "created_at": "2026-03-21T..." }

GET /api/documents

List all documents. Supports ?limit=50&offset=0

DELETE /api/documents/:slug

Delete a document by slug.

Media API

POST /api/media

# 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.

Response:
{ "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" }

GET /api/media

List all media. Supports ?limit=50&offset=0&type=image|video

DELETE /api/media/:slug

Delete a media file by slug.