Publish HTML as a Foliyo link
publish_htmlCreate or update a Foliyo link from finished static HTML. Returns the URL, generated PIN and requested personal recipient links. New shares default to a generated PIN; updates preserve omitted settings and require the current revision. 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. | |
| 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 | ||
| acceptStatic | No | Acknowledge removal of scripted functionality. Prefer converting to static HTML before publishing. | |
| 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. |