Add page
add_pageAdd a new ONE-OFF page to an existing site (About, Contact, Pricing, a new landing page, etc.). Creates a bare shell (one section with one heading) and returns its root + section ids so you can fill it with insert_nodes / patch_nodes. Writes a new draft version. Pass copy_of with an existing page's slug to start from a copy of that page instead.
DO NOT use add_page for repeating detail pages that share structure (/projects/<slug>, /blog/<slug>, /work/<slug>, /publications/<slug>, /searches/<slug>, etc.). Those resolve via the site's collections[] definition + Mustache substitution into a single shared template — they are NOT pages[] entries. To add an item to an existing collection, use add_content_item (with the matching content_type). To stand up a new collection on a site that doesn't yet have one, use create_collection (which composes the collections[] entry, an index page, and optional seed items in one call). add_page is wrong every time for collection detail pages: it bakes the row as a static tree, the index page's <collection-list> won't reflect it, and sitemap/SEO won't see it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| title | Yes | ||
| copy_of | No | Make the new page a COPY of this existing page (e.g. '/services/plumbing' to start '/services/roofing' from it): its whole tree is cloned with fresh ids, then edit the copy. Omit for a page built from the site's own sections. | |
| site_id | Yes |