ship api
ship API Specification
Base URL: https://ship.app
Publish HTML
POST /api/publish
{"html":"<!DOCTYPE html><html>...</html>"}
Response 201: {"success":true,"id":"abc123","url":"https://ship.app/abc123"}
Publish multiple files
POST /api/files
{"files":{"index.html":"...","style.css":"...","script.js":"..."}}
Fetch stored HTML
GET /api/page/[id]
Public page
GET /[id]
Report a page
POST /api/report/[id]
{"reason":"Spam or abuse"}
Page metadata
GET /api/meta/[id]
Health check
GET /api/health
Errors: 400, 404, 429 (includes "code" field)
curl -X POST https://ship.app/api/publish \
-H "Content-Type: application/json" \
-d '{"html":"<!DOCTYPE html><html><body>Hello</body></html>"}'