Import HTML site
import_siteTurn a static HTML site (pages, CSS, JS, images) into a NEW editable PageHub site draft. Inputs, one per call: filePath (local folder or .zip; local server only); size (zip bytes) returns an upload URL, curl line and uploadKey; uploadKey, after the PUT, starts the import; files sends text files inline (≤3MB); restOf (an importId) brings the pages a plan's page limit left out into that import's same site, after an upgrade. Returns an importId for get_import_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Site name (default: home page title). | |
| size | No | Exact zip size in bytes → returns an upload URL. | |
| files | No | Inline files: path relative to the site root. | |
| pages | No | Archive paths of the pages to import (e.g. about.html), when the plan's page limit can't take them all. The home page is always included; the limit still applies, in this order. | |
| restOf | No | importId of a capped import: adds the pages it left out to that same site. Needs a plan that takes more pages (get_import_status says when). | |
| uploadKey | No | From the size step, after the PUT succeeded → starts the import. |