Compose site
create_site_from_templateCreate a new Sitelas site by cloning a template archetype. The template provides the design skeleton (page composition, section layouts, typography rhythm); you customize it for the specific brief via brand_overrides at create time + ONE bulk patch_nodes call afterwards (the only patch primitive — no per-node fallback). The site is saved as a DRAFT — not publicly live until the user approves and you call publish. Returns url (preview URL, best shared after customization patches are applied), site_id for subsequent edits, manifest (every patchable node id + current text + slot, replaces get_site for discovery), customization_brief (prose guidance for this archetype), overrides_applied, alternative_templates (other templates and who each suits, for an owner who wants a different design), and next_step (a suggested follow-up summary). Standard customization pattern after this call: read the manifest, build one patches array covering every text/image/cta change across all pages and siteElements, send one patch_nodes call. If the owner described pages, home sections, a hero style or light/dark, pass layout and the response's layout_plan.steps lists the calls that add what the template lacks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layout | No | The site's SHAPE when the owner described it — the pages they want, what the home page shows and in what order, how the hero looks, light or dark. Pass it whenever they said any of these: the response then includes `layout_plan`, the exact calls (add_page, add_section, create_collection, move_nodes, set_theme (with colors)) that make the template match what they described. Omit when they described only the business. | |
| site_name | Yes | Human-readable site name. Stored on the template metadata and used as the default base for the subdomain slug. Note: does NOT automatically substitute into visible header/footer brand text — include the header brand-name node in your patch_nodes batch (slot: 'brand-name' in the manifest) to update the displayed brand. | |
| subdomain | No | Preferred subdomain slug (a-z, 0-9, hyphen, 3–32 chars). Auto-generated from site_name if omitted. A 4-digit suffix is always appended to guarantee uniqueness. | |
| page_slugs | No | Re-address the template's pages for THIS brief, as { currentSlug: newSlug } — e.g. { "/attorneys": "/founders", "/practices": "/services" }. Archetypes carry their origin vertical in their paths, so a template used outside that vertical ships URLs that contradict its own copy: a soccer-recruiting site serving /attorneys. Set them here and the pages are simply created at the right paths — no redirects, no aliases, nothing to clean up, because nothing is published yet. Sub-pages follow their parent automatically and the template's own nav links are rewritten to match. Partial is fine; unlisted pages keep the template's slug. Leave paths that already read generically (/about, /contact, /work) alone — the ones to fix are vertical leftovers. An unknown key is an error, not a silent no-op. | |
| template_slug | Yes | Slug of the template archetype to clone (from find_templates). E.g. 'dossier', 'beacon', 'tessel'. | |
| brand_overrides | No | Theme nudges applied at create time: primary/accent/background color, heading/body font. When the brief names a specific mood (rainy PNW, brutalist, Victorian, editorial newsprint) pass both color AND typography that match — don't set colors and leave fonts as the template's default. Each knob is independent. Omit entirely only when the brief says 'use the template as-is' or is silent on both color and typography. | |
| collection_prefixes | No | Re-address collection detail URLs, as { contentType: newPrefix } — e.g. { "project": "/case-studies/" }. Same reasoning and same free-at-creation window as page_slugs; row-template links are rewritten with it. Usually unnecessary: shipped prefixes (/blog/, /shop/, /projects/) are already generic. NOTE this is the only moment a collection's path can change — once its items are published the path is fixed, because moving them would 404 every existing link. |