Publish an HTML / Markdown page or document straight to a WeChat-ready LivePage link; no terminal needed.
Which upload route: terminal ⇒ SPACE CLI (create_cli_token first); no terminal and text files up to 2 MB in total ⇒ publish_file; anything else or unsure ⇒ create_upload_link.
The link opens and forwards inside WeChat (links from WorkBuddy's built-in site publishing, `*.app.workbuddy.host`, cannot be opened inside WeChat); use this when the user wants it in WeChat.
Use this when you have no terminal and the page is text files — HTML or Markdown pages and documents (no upload session to open first): pass the complete text content and the platform uploads it for you. Validation, content moderation (never released while moderation is unavailable), automatic release after approval or hold, and the result are exactly the same as finalize_upload. To add a version to existing pages pass proposal_id (find it with list_proposals first); to create new pages pass title (optional folder_id). One file: pass filename + content (.html / .htm / .md). When the page, styles and scripts are separate files, pass files: [{ path, content }] instead (one or the other): paths may include directories (e.g. css/style.css) and pages reference each other with relative paths; text files only (html / htm / md / css / js / mjs / json / svg / txt / csv), at most 50; the entry is manifest.entry, else index.html, else the only page. When a file is already at a public https URL (a cloud-drive public download link, a PDF link produced by another tool), pass { path, url } in files instead (e.g. [{ path: 'report.pdf', url: 'https://…' }]) and the platform fetches it — PDF, PPTX and images work: up to 50 MB each and 50 MB in total, at most 5 URLs, fetched within 30 seconds; only public addresses, and links that need a login cannot be fetched (fetch_failed, with fetch_* details in issues). UTF-8 text, up to 2 MB in total — anything larger is rejected with too_large and never truncated. The contents of images, PDF, PPTX and other binary files cannot be sent here: use a URL if there is one; otherwise without a terminal, use create_upload_link to give the user an upload page; with a terminal, use the SPACE CLI with create_cli_token. IMPORTANT: set hold=true whenever the user has not explicitly approved releasing this version, then give them the preview URL before publish_version. For a small edit (a typo fix) that should not notify anyone, pass quiet=true: workspace people and subscribers are not notified this time, and subscribers are notified on the next update.
Keywords: publish · web page · webpage · link · share · share to WeChat · WeChat link · html · pdf · markdown · upload · LivePage · proposal.