Publish, update, import, and manage shared boards.
Publish a board
POST /api/moodboards/{id}/share
{
"kind": "live" | "archive",
"include_history": false
}
For kind: "live":
- Generates the static HTML.
- Uploads to your Cloudflare Worker (configured in Settings).
- Returns the public URL.
For kind: "archive":
- Generates a ZIP file with the HTML + media.
- Returns the download URL.
Response:
{
"share_id": "…",
"url": "https://moodboard-share.<your>.workers.dev/view/…", // for live
"download_url": "/media/share-archive-….zip", // for archive
"kind": "live" | "archive"
}
Update an existing share
PUT /api/moodboards/{id}/share
Re-uploads only the changed files to the Worker. The URL stays the same.
Stop sharing
DELETE /api/moodboards/{id}/share
Removes the HTML and media from R2. The URL stops resolving.
Import a shared board
POST /api/moodboards/{id}/import
{
"from_url": "https://…", // one of from_url or from_zip
"from_zip": "/uploads/…zip",
"mode": "replace" | "append" | "new-board"
}
For new-board the import creates a fresh board and returns its id.
Leave a Reply