Publish HTML as a Foliyo link
publish_htmlCreate or update a Foliyo link from finished HTML: static by default, or interactive:true to keep its scripts in a sandboxed frame. For NEW work, first resolve all six choices through prepare_foliyo and obtain approval of the complete summary (readyToBuild=true); a format choice alone does not authorize publishing or defaulting other choices. Returns the URL, generated PIN and requested personal recipient links. The API's fallback PIN is not permission to skip the access question. Updates preserve omitted settings and require the current revision from get_page. An unverified email gate records claimed addresses; verified email access requires Pro. Notification email is opt-in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Named recipients. Each gets their own link so opens are attributable. | |
| gate | No | Use "pin" for a generated code, "email" to collect addresses (Pro; verify:true proves mailbox access), "domain:acme.com" to restrict email domain, or "none" to explicitly open a page and remove its PIN. Omit on updates to preserve the current policy. | |
| html | Yes | The full HTML document to publish. WRITE IT FOR A PHONE FIRST: most of these links are opened on one. A viewport meta tag, max-width rather than fixed pixel widths, images at max-width:100%, a single column below ~640px, and nothing that needs sideways scrolling. The server adds a viewport tag when you leave it out, but it cannot reflow a 900px-wide layout. | |
| note | No | One plain line saying what changed, e.g. "Added the Q3 numbers". Shown to readers on the project hub under 'what changed since you were last here', and used in the update email. Write it every time you republish something inside a project: it is what saves the user from explaining the change to their team by hand. | |
| slug | No | Preferred URL slug. One taken for you if omitted. | |
| reply | No | Put a one-line reply box at the foot of the page so readers can answer without leaving it. true for the default label, or your own short prompt. | |
| title | No | Title shown on the page and in link previews. | |
| track | No | Enable viewing analytics; plan limits still apply. | |
| assets | No | ||
| format | No | Presentation format; fixed slides use data-foliyo-slide on every slide. | |
| notify | No | Email everyone already holding this link to say it has been updated. Off by default, because republishing while you iterate must not mail anybody. Pass true only when the user says to tell them. | |
| sender | No | Who it is from: a saved identity's label, e.g. "Ashford Advertising". brand_guide lists the saved identities. Unknown labels are refused. | |
| verify | No | Email a code to prove the viewer owns the address. | |
| expires | No | When it stops working: "14d", "48h", or an ISO date. | |
| project | No | Which saved project this belongs to, e.g. "acme". Settles the letterhead, the design guide and the recipients in one, so none of them need asking again. Anything you pass explicitly still wins. If the user works on several streams of work and has projects saved, pick the matching one rather than re-asking the same three questions. | |
| audience | No | A saved group to send to, e.g. "acme-team". Expands into named recipients exactly as if you had typed them, and stacks with `to` for one-offs. brand_guide lists them. | |
| maxViews | No | Stop working after this many views. | |
| notesOff | No | Pro only. Section names (heading text or data-section) to switch reader notes off for. Sections are on by default. Omit to leave the current setting; [] switches all back on. When two headings share a name, 'name#index' (index = the section's 0-based position among the page's h1/h2/h3/data-section elements, e.g. 'Summary#4') switches off only that one; the plain name switches off every section with that name. Authors can also mark a heading with data-notes="off". | |
| password | No | A code of the user's own for the PIN gate. LEAVE IT OUT unless the user named one: with gate:"pin" and no `password`, the server mints six digits and returns them as `sharePassword`, which is the code to repeat back. Never invent one yourself - an invented code is a different shape every time, and the lock screen asks the recipient for six digits. A code the user does name is kept as given (minimum 4 characters). Everyone shares the one code, so every reader stays anonymous in the report: add `to` for personal links, or use gate:"email" when the user wants names. | |
| description | No | ||
| interactive | No | Keep the page's scripts. The document runs in a sandboxed frame like a Claude artifact: inline scripts and scripts from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com and code.jquery.com; stylesheets from fonts.googleapis.com and those hosts; no fetch or network, no storage or cookies, no dialogs, no embedded documents. Omit on updates to keep the page's current setting. Off by default: a static page is lighter and prints completely. | |
| acceptStatic | No | Acknowledge removal of scripted functionality from a STATIC page. Prefer interactive:true when the scripts matter, or convert to static HTML first. | |
| expectedRevision | No | Required for updates. Use the revision returned by get_page, never guess. | |
| allowContentRemoval | No | Only true after the user intentionally removes content reported by preflight or an update warning. |