Website builder tools
These tools create empty websites, read complete website documents, and manage individual pages. They do not accept a complete website document for writing. The authenticated company must own the website or creation target. Reads and integrity checks require the website-type Read permission; writes, repair, and deletion require Full. Agent and property sites also follow the editor's own-site and broader permission rules. See the Website Builder API reference for detailed validation and failure behavior.
Each tool advertises a structured response. It contains success and statusCode, and may contain error, warning, websiteId, website, catalog, component, page, items, or integrityErrors. A failed creation may still return the created websiteId or page; a failed mutation may already have changed data. Inspect the result before retrying. These operations are not transactional.
In the table, R means read-only, D means marked destructive, and O means marked open-world. A dash means none of those annotations is true. Top-level parameters are required unless noted otherwise.
| Tool | Arguments | Behavior | Annotations |
|---|---|---|---|
website_builder_get_structure | siteId | Read the complete website in website, including template/version, all pages with content, and site-wide components. | R |
website_builder_get_template_components | siteId | Discover the selected template's slim component list in catalog. | R |
website_builder_get_template_component | siteId, componentParseName | Read one component's field map and content defaults in component. | R |
website_builder_create_empty | request | Create an empty company, agent, or property website. | - |
website_builder_delete | websiteId | Permanently delete a website; cleanup can be partial on failure. | D, O |
website_builder_get_page | siteId, pageId | Return the page including content in page. | R |
website_builder_get_page_info | siteId, pageId | Return page metadata in page; the repository populates only ID, name, and site ID. | R |
website_builder_create_page | siteId, request | Create a page and return it in page. | - |
website_builder_update_page | siteId, pageId, request | Change name and/or visibility. | - |
website_builder_save_page_content | siteId, pageId, content | Replace all modules; an empty array clears them. | D |
website_builder_make_home_page | siteId, pageId | Set a clickable page as home. | - |
website_builder_set_site_map_hierarchy | siteId, hierarchy | Replace the complete page hierarchy. | D |
website_builder_check_site_integrity | siteId | Check visible page modules; integrityErrors may be omitted. | R |
website_builder_fix_website_errors | siteId | Attempt repairs and return any remaining integrity errors. | D |
website_builder_delete_page | siteId, pageId | Delete a page only if it has no children or references. | D |
Website structure
Call website_builder_get_structure with { "siteId": 100 }. The response contains success, statusCode, and a typed website document. The same operation is available as GET /api/v1/WebsiteBuilder/GetStructure?siteId=100.
website.pages is a flat, complete inventory including hidden pages, with page IDs, parentId, sibling order, isHome, visibility/clickability flags, and content. Array position is not navigation order. website.templateId and nullable templateVersion describe the selected template. siteComponents contains stored site-wide components; separate menu/footer configuration remains in the top-level menuData and footerData fields. An empty website returns empty page and component arrays. This read does not mark the site dirty or publish it.
Reads are not an atomic snapshot: concurrent edits may require refreshing. Incomplete page/component reads fail rather than returning a successful partial inventory. Use the separate template catalog below to discover unused components.
Template component catalog
Call website_builder_get_template_components with { "siteId": 100 }, or use GET /api/v1/WebsiteBuilder/GetTemplateComponents?siteId=100. Both require the same website-type Read permission as the structure read. The selected template is resolved from the website; callers cannot supply another template ID.
The typed catalog contains websiteId, templateId, nullable templateVersion, and components, including unused variants. Components are sorted by blockName, then blockParseName.
Each entry contains name, compiledSourceName, thumbnail, and attributes. Read-only aliases blockName and blockParseName return name and compiledSourceName, respectively, matching the fields used when saving page content. Preview references are not guaranteed to be absolute URLs. The list uses the editor's slim template cache; when the cache is built, invalid entries and duplicate parse names are ignored, keeping the first duplicate. Existing cached entries are not upgraded automatically. The shared cache keeps the editor's original component order; the catalog is sorted when read. It does not include field maps or defaults.
For a selected entry, call website_builder_get_template_component with { "siteId": 100, "componentParseName": "exact-parse-name" }, or GET /api/v1/WebsiteBuilder/GetTemplateComponent?siteId=100&componentParseName=.... The component result includes the identifiers, thumbnail, attributes, block types, dynamic/site-wide/editor-ignored flags, structured map, and structured defaultData. Serialize defaultData to a JSON string for the page component's data field; change only editable fields described by the map. A dynamic component may also need application data or target-page references. Site-wide and editor-ignored components are not ordinary page modules; editor-ignored components have no defaults. Source and compiled HTML are not returned.
A selected template with no valid cached components returns an empty components array. A missing component returns 404; a website without a selected template returns 409. A null template version does not prevent reading the assigned template. A missing or unreadable catalog fails rather than becoming an empty result.
Both operations require website-type Read permission and resolve the template from the website. They do not switch templates, save website content, or publish. Refresh the list if another user changes the website's template.
Request objects
website_builder_create_empty takes a request with numeric type (0 company, 1 agent, 2 property), required subdomain, optional domain and public templateId, and a positive typeId for agent or property. Omit typeId for a company site. The entity must belong to the authenticated company and must not already have a site. On success, the new site is associated with its agent or property and marked dirty.
{
"request": { "type": 1, "typeId": 21, "subdomain": "jordan", "templateId": 42 }
}
website_builder_create_page takes request.name, parentId (zero for a root), isHidden, and isNonClick. A nonzero parent must belong to the same website. website_builder_update_page takes request.name and/or request.isHidden; omitted or null fields are unchanged. IDs are positive.
{
"siteId": 100,
"request": { "name": "About", "parentId": 0, "isHidden": false, "isNonClick": false }
}
website_builder_save_page_content takes an ordered array of page modules. Module data is a JSON-encoded string mapping template field names to values, not an embedded object. Names and fields depend on the selected template; see page content. The server assigns website and page IDs and orders modules according to their position.
{
"siteId": 100,
"pageId": 101,
"content": [{ "blockName": "ImageLargeModule", "blockParseName": "ImageLargeModule_50_hero", "data": "{\"Title\":\"Welcome\"}" }]
}
website_builder_set_site_map_hierarchy takes the complete array of { "id": ..., "parentItemId": ..., "order": ... } entries. Every page must appear exactly once; zero denotes a root and cycles and foreign parents are rejected. order is sibling order; path is not used by the repository.
When page deletion is blocked, the response has statusCode 409 and error HAS_CHILDREN or HAS_REFERENCES; the latter includes referencing page IDs in items. Repair can succeed while integrityErrors still contains problems that could not be repaired.