API Reference
Explore the full BrewPage REST API — 8 tags, 15+ endpoints, all publicly accessible.
Interactive Explorer
Loading API Reference...
Alternative API Viewers
| Viewer | URL |
|---|---|
| Swagger UI (live on server) | brewpage.app/swagger-ui/index.html |
| Scalar (this page) | Embedded above |
| OpenAPI JSON | brewpage.app/v3/api-docs |
OpenAPI Specification
Download the full OpenAPI 3.1 spec:
| Format | Source |
|---|---|
| YAML | openapi.yaml |
| JSON | openapi.json |
| Live endpoint | brewpage.app/v3/api-docs |
API Endpoints Overview
Base URL: https://brewpage.app (alias: https://brewdata.app)
| Tag | Description | Key Endpoints |
|---|---|---|
| HTML | HTML/Markdown page hosting | POST /api/html, GET /api/html/{ns}/{id} |
| KV | Key-value store (1000 keys/ns) | PUT /api/kv/{ns}/{id}/{key}, GET /api/kv/{ns}/{id}/{key} |
| JSON | JSON document store (10K docs) | POST /api/json/{ns}/{collection}, GET /api/json/{ns}/{collection}/{id} |
| Files | File hosting (5 MB/file) | POST /api/files, GET /api/files/{ns}/{id}, DELETE /api/files/{ns}/{id} |
| Sites | Multi-file HTML site hosting | POST /api/sites, GET /api/sites/{ns}/{id}, GET /api/sites/{ns}/{id}/files/{filePath}, DELETE /api/sites/{ns}/{id} |
| Gallery | Public content browser | GET /api/gallery/pages, GET /api/gallery/files |
| Stats | Platform statistics | GET /api/stats |
| Short Links | URL shortener | GET /s/{code} |
| SEO | Search engine support | GET /sitemap.xml, GET /robots.txt |
Authentication
Most read endpoints are public — no auth required.
Write operations use owner tokens returned in create responses:
| Method | Example |
|---|---|
| Header | X-Owner-Token: tok_xxx |
| Query param | ?token=tok_xxx |
Password-protected content:
| Method | Example |
|---|---|
| Header | X-Password: secret |
| Query param | ?p=secret |
Rate Limits
| Operation | Limit |
|---|---|
| Uploads (POST) | 60/hour/IP |
| Reads (GET) | 300/min/IP |
Size Limits
| Resource | Max Size | Max Count |
|---|---|---|
| HTML page | 5 MB | — |
| KV value | 1 MB | 1,000 keys/store |
| JSON doc | 1 MB | 10,000 docs/collection |
| File | 5 MB | 1,000 files/ns |
| TTL | 30–365 days | — |
Try It Now
curl https://brewpage.app/api/stats
curl -X POST https://brewpage.app/api/html \
-H "Content-Type: application/json" \
-d '{"content":"<h1>Hello!</h1>","format":"HTML"}'
Links
- brewpage.app — Live platform
- Swagger UI — Built-in API explorer
- Getting Started — Quick start guide
- Examples — Code snippets in 6 languages
- MCP Server — AI assistant integration