Host an HTML doc
host_html_contentHost an HTML doc on docfarm and return its share link. A name that exactly matches an existing doc's title, ignoring case and surrounding spaces, overwrites that doc in place, keeping its share link, password, and view stats, so anyone holding the URL sees the new version. Any other name creates a new doc. A similar but different name, such as "Pricing" next to "Pricing final", also creates a new doc and leaves the other one untouched, and the response names that doc so you can offer to update it instead. To update a doc, reuse its exact title. Takes the HTML inline, so it works in any environment. For a small change to an existing doc, get_doc_html + patch_doc sends far less content. Every page is scored against the docfarm house standard on the way in and the score comes back in the response; call get_build_brief BEFORE you write the HTML so you meet the standard first time rather than fixing afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Full HTML body | |
| name | Yes | Page name. To update a doc, reuse its exact title, which keeps the share link. A new or merely similar name creates a new doc. | |
| account | No | Email address of the farm to act on. Omit for the signed-in farm. Only a connected account is accepted; call list_accounts to see which. | |
| replace | No | Omit normally. Set false to publish a new doc even when the name exactly matches an existing one, which gets a new share link. Set true only when the person asked to replace a doc and you do not have its exact title. It then also overwrites the one doc with a similar name, such as "Pricing v2" for "Pricing", and publishes nothing when no doc or several docs match. | |
| brand_from | No | Optional. Name of an existing HTML doc in this farm whose brand assets this page uses. Required for any DF_ASSET_ token you wrote to resolve to real bytes. Get the tokens from get_build_brief first, then pass the same doc name here. |