Website Builder API
Create your site without code
Blocks
Create Block
/services/websites/v1/blocks/create
Auth
List Blocks
/services/websites/v1/blocks/all
Auth
Get Block
/services/websites/v1/blocks/get
Auth
Edit Block
/services/websites/v1/blocks/edit
Auth
Delete Block
/services/websites/v1/blocks/delete
Auth
Set Block Content
/services/websites/v1/blocks/set-content
Auth
ComponentVersions
/services/websites/v1/versions/list
Auth
/services/websites/v1/versions/get
Auth
/services/websites/v1/versions/revert
Auth
/services/websites/v1/versions/delete
Auth
/services/websites/v1/versions/latest
Auth
Components
Create Component
/services/websites/v1/components/create
Auth
Note: This endpoint is not used anywhere currently.
Add Component to Block
/services/websites/v1/components/add-to
Auth
Change Component Type
/services/websites/v1/components/change-to
Auth
Delete Component
/services/websites/v1/components/delete
Auth
Set Component Content
/services/websites/v1/components/set-content
Auth
Update Component Order
/services/websites/v1/components/update-order
Auth
Duplicate Component
/services/websites/v1/components/duplicate
Auth
Unlink Component
/services/websites/v1/components/unlink
Auth
When a component is linked to a template (has partial_partial meta), this endpoint will: 1. Copy all template content (custom fields config, code) to the component 2. Remove the template link (partial_partial meta) 3. Component becomes independent with its own copy of data
Convert to Template
/services/websites/v1/components/convert-to-template
Auth
This is the inverse of the Unlink operation: 1. Creates a new Partial (reusable template) with custom='custom_template' 2. Copies the component's data (code, meta, custom_fields) into a PartialsComponents child 3. Updates the original component to become a templatePartial linked to the new template
Paste Component
/services/websites/v1/components/paste
Auth
Export Component
/services/websites/v1/components/export
Auth
Import Component
/services/websites/v1/components/import
Auth
Update Custom Fields
/services/websites/v1/components/update-custom-fields
Auth
Deployment
Download a specific website version with signature validation
/services/websites/v1/generator/download/{websiteId}/{versionId}
Public
URL format: /download/{websiteId}/{versionId}?signature={hmac}&expires={timestamp} PAUSE/RESUME SUPPORT: - Browser: Automatic pause/resume support via Range headers - Envoy wget: Use `wget -c URL` for continue/resume - Envoy curl: Use `curl -C - -o file.zip URL` for continue/resume HEADERS: - Accept-Ranges: bytes (enables pause/resume) - Content-Type: application/zip - Cache-Control: public, max-age=3600 (1 hour cache)
Deploy Website
/services/websites/v1/websites/deploy
Auth
Get Deployment Status
/services/websites/v1/websites/deployment/status
Auth
Get Domain Status
/services/websites/v1/websites/deployment/domain/status
Auth
Update Deployment Domain
/services/websites/v1/websites/deployment/domain/update
Auth
Check Domain DNS
/services/websites/v1/websites/deployment/domain/dns-check
Auth
Reset Deployment
/services/websites/v1/websites/reset-deployment
Auth
Cancel Deployment
/services/websites/v1/websites/cancel-deployment
Auth
Get Auto-Publish Schedule
/services/websites/v1/websites/schedule/get
Auth
Returns the current auto-publish schedule configuration and the outcome of the most recent scheduled run for the current project's website.
Update Auto-Publish Schedule
/services/websites/v1/websites/schedule/update
Auth
Saves the auto-publish schedule configuration for the current project's website. Set schedule_enabled=false to pause the schedule without losing the config.
Get Publish Data
/services/websites/v1/websites/get-publish-data
Auth
Returns all data needed for the publish popup: - Domain information (wemasy/custom/none) - Versions list with current version (from database) - Deployment status and logs (from Redis + database) - Current action type (generate/generate-deploy) PERFORMANCE: Database-only queries, no filesystem reads
Rollback Website to Previous Version
/services/websites/v1/websites/rollback
Auth
ARCHITECTURE: - Local environment: Direct filesystem access via WebsiteVersionManager - Production: Remote symlink update via SSH on Generator server Rolls back the website to a specific version by updating the symlink and recording the deployment time in the database.
Download a specific website version
/services/websites/v1/websites/download-version
Auth
Download Deployment Logs or Results
/services/websites/v1/websites/download-generation-file
Auth
Setup Wemasy Domain
/services/websites/v1/websites/setup-wemasy-domain
Auth
Saves wemasy domain to projects table and optionally switches to it
Switch Domain Type
/services/websites/v1/websites/switch-domain-type
Auth
Switches active domain between custom and wemasy
Check DNS Propagation (API Endpoint)
/services/websites/v1/websites/check-domain-propagation
Auth
Checks immediately and dispatches background job for automatic checking if not verified
Confirm DNS Records Added
/services/websites/v1/websites/confirm-dns-records
Auth
Called when user clicks "I've added the DNS records" in the publish popup. Sets dns_records_added_at = now() so the DNS setup screen is hidden and the user can proceed with deployment. Also dispatches a background job to check DNS propagation automatically. When propagation is confirmed, dns_verified will be set to '1'.
Get DNS Settings
/services/websites/v1/websites/dns-settings
Auth
Returns the DNS records needed for the custom domain, along with the current DNS verification status.
File Uploads
Get File Upload Signed URL
/services/websites/v1/files/get/visitor-signed-url
Public
Get Uploaded Files
/services/websites/v1/files/visitor-get
Public
Delete Uploaded File
/services/websites/v1/files/visitor-delete
Public
Get Large File Upload Signed URL
/services/websites/v1/files/get/signed-url
Auth
Get Large Uploaded Files
/services/websites/v1/files/get
Auth
Delete Large Uploaded File
/services/websites/v1/files/delete
Auth
Forms
Where a form is embedded (pages, templates/layouts, partials)
/services/websites/v1/forms/usage
Auth
Forms (cross-project)
Clone a form from one project to another
/services/websites/v1/forms/clone
Auth
Deep-copies the form post + `code` JSON (modern) or form_items (legacy). Idempotent by `base_post_id`.
Layouts
Create Layout
/services/websites/v1/layouts/create
Auth
Create Layout from Theme
/services/websites/v1/layouts/create-from-theme
Auth
POST /api/services/websites/v1/layouts/create-from-theme
List Layouts
/services/websites/v1/layouts/all
Auth
Edit Layout
/services/websites/v1/layouts/edit
Auth
Get Layout
/services/websites/v1/layouts/get
Auth
Update Layout Templates
/services/websites/v1/layouts/update-templates
Auth
Archive Layout
/services/websites/v1/layouts/archive
Auth
Delete Layout
/services/websites/v1/layouts/delete
Auth
Layouts (cross-project)
Clone a layout from one project to another
/services/websites/v1/layouts/clone
Auth
Deep-copies the layout + all child templates (header/footer/content) + their components + meta + S3 thumbnails. Idempotent by `base_post_id` — re-running returns the existing clone unless `force_new=true`.
MediaDelete
/services/websites/v1/media/delete
Auth
MediaGet
/services/websites/v1/media/get
Auth
MediaList
/services/websites/v1/media/list
Auth
MediaPermanentDelete
/services/websites/v1/media/permanent-delete
Auth
MediaRegister
/services/websites/v1/media/register
Auth
MediaUpdate
/services/websites/v1/media/update
Auth
MediaUpload
/services/websites/v1/media/upload
Auth
MediaUsage
/services/websites/v1/media/usage
Auth
Menus
List Menus
/services/websites/v1/menus/all
Auth
Menus Get
/services/websites/v1/menus/get
Auth
Edit Menu
/services/websites/v1/menus/edit
Auth
Create Menu
/services/websites/v1/menus/create
Auth
Delete Menu
/services/websites/v1/menus/delete
Auth
Where a menu is assigned (pages, layouts/templates, partials)
/services/websites/v1/menus/usage
Auth
Menus (cross-project)
Clone a menu from one project to another
/services/websites/v1/menus/clone
Auth
Deep-copies the menu post + its `code` JSON. Idempotent by `base_post_id`: re-running returns the existing clone with refreshed `code` instead of duplicating.
Page Not Found
List Page Not Found Records
/services/websites/v1/page-not-found/all
Auth
Returns paginated 404 records for the current website, sorted by hit count (high impact first).
Delete Page Not Found Record
/services/websites/v1/page-not-found/delete
Auth
Soft-deletes a 404 monitoring record.
Pages
List Pages
/services/websites/v1/pages/all
Auth
Get Page Sections Summary
/services/websites/v1/pages/sections-summary
Auth
Returns a lightweight summary of all sections (components) on a page. Each section includes its ID, position order, type, and a label. Labels are resolved from: template_title meta, partial name (for templatePartial), first heading in content, or fallback to "Section N".
Get Section Blocks Summary
/services/websites/v1/pages/section-blocks-summary
Auth
Returns a lightweight summary of top-level blocks inside a section component. Only shows the first level of blocks — nested blocks inside columns, sliders, or accordions are not included. For nested editing, use the visual designer.
Create Page
/services/websites/v1/pages/create
Auth
Create Page from Source (Theme or Infrastructure)
/services/websites/v1/pages/create-from-source
Auth
POST /api/services/websites/v1/pages/create-from-source
Get Page
/services/websites/v1/pages/get
Auth
Edit Page
/services/websites/v1/pages/edit
Auth
Update Page Template
/services/websites/v1/pages/update-template
Auth
Archive Page
/services/websites/v1/pages/archive
Auth
Delete Page
/services/websites/v1/pages/delete
Auth
Duplicate Page
/services/websites/v1/pages/duplicate
Auth
Export Page
/services/websites/v1/pages/export
Auth
Import Page
/services/websites/v1/pages/import
Auth
Pages (cross-project)
Clone a page from one project to another (with its layout)
/services/websites/v1/pages/clone
Auth
Deep-copies the page + components + meta + S3 thumbnails. When `clone_layout=true` (default) the source page's layout is cloned to the target FIRST, then the new page's parent_id is wired to the cloned layout's id.
Preview Designer Data
Get Secured Page Designer
/services/websites/v1/secured/page-designer/get
Public
Get Page Designer Data
/services/websites/v1/page-designer/get
Auth
Project Duplicate
Duplicate Project
/services/websites/v1/projects/duplicate
Auth
POST /api/services/websites/v1/projects/duplicate Creates a complete duplicate of the source project with all related data. Only accessible by super administrators.
Project Mirror
Export a project's full hierarchy, categorised by product
/services/websites/v1/projects/clone-tree-export
Auth
Returns: { project, sitebuilder: {customization, layouts, templates, pages, menus, structures}, forms: {forms}, webshop: {...}, manifest, exported_at }
Project Mirror (cross-project)
Import encrypted state archive into a project. Dispatches ImportWebsiteStateJob for async processing
/services/websites/v1/projects/state/import
Auth
Import a project tree into a target project
/services/websites/v1/projects/clone-tree-import
Auth
Pushes the full sitebuilder hierarchy (customization + layouts + templates + pages + menus + structures + forms) from a source project to a target. Per-phase counts and idempotent across re-runs via `base_post_id` (sitebuilder) and `identifier` (structures).
ProjectStateDownload
/services/websites/v1/projects/state/download
Auth
ProjectTreeDiff
Compare an uploaded encrypted state archive against a live project
/services/websites/v1/projects/state/diff
Auth
Accepts a `.wemasy` file upload + decryption key, decrypts, and returns per-item diff status (new/changed/unchanged/conflict).
Projects (cross-project)
Bulk-upsert project metas (filtered safe-keys)
/services/websites/v1/projects/meta-apply
Auth
Applies a `metas` map to a target project. Filters out billing, integration tokens, deployment state, and other per-project keys by default — see `DEFAULT_BLOCKED_PREFIXES`. Additive: keys not in the payload are untouched on the target.
Public
Handle Redirection
/services/websites/v1/redirect
Public
Submit Form
/services/websites/v1/forms/submit
Public
Issue Captcha Challenge
/services/websites/v1/forms/altcha/challenge
Public
Public, unauthenticated endpoint the ALTCHA widget fetches (via `challengeurl`) on every form render. Returns the bare, signed challenge JSON — NOT wrapped in the standard ApiResponse envelope — because the widget expects the provider's native shape ({ algorithm, challenge, maxnumber, salt, signature }). Cheap by design: a single HMAC operation, no database writes. The HMAC secret never leaves the server. Route-level throttling guards against abuse.
Download Signed File
/services/websites/v1/download
Public
Report Page Not Found
/services/websites/v1/404
Public
Registers a 404 hit for monitoring. If the URL was already reported, increments the hit counter. Rate limited to 2 reports per IP per day (silently ignores excess).
Search Content
/services/websites/v1/search
Public
Register Onboarding User
/services/websites/v1/onboarding/user/new
Public
Rate limit: 100 requests per minute.
Confirm Onboarding User
/services/websites/v1/onboarding/user/confirm
Public
Rate limit: 100 requests per minute.
Resend Verification Email
/services/websites/v1/onboarding/user/resent-verification
Public
Settings
Get Product Pricing List
/services/websites/v1/pricing
Public
Get Product Pricing List
/services/websites/auth/v1/pricing
Auth
Get All Available Pages
/services/websites/v1/pages/available-indexed
Auth
Returns all indexable content (pages, structures, webshop items) where no_index is 0 or null
List Forms
/services/websites/v1/forms/all
Auth
Get all available Google Fonts
/services/websites/v1/fonts/all
Auth
Manually trigger thumbnail regeneration for a page, template, or layout
/services/websites/v1/thumbnails/regenerate
Auth
Runs after the HTTP response is sent (no queue worker required). Rate limit: 5 requests per project per 10 minutes. POST /api/services/websites/v1/thumbnails/regenerate
Get count of scheduled structure items
/services/websites/v1/scheduled/count
Auth
Structures
Create Structure
/services/websites/v1/structures/create
Auth
List Structures
/services/websites/v1/structures/all
Auth
Get Structure
/services/websites/v1/structures/get
Auth
Edit Structure
/services/websites/v1/structures/edit
Auth
Delete Structure
/services/websites/v1/structures/delete
Auth
Structures (cross-project)
Clone a structure (definition + posts + categories) across projects
/services/websites/v1/structures/clone
Auth
Deep-copies the full content tree of a structure type. Idempotent by (website_id, identifier). Posts match on `unique_identifier`/`url`; categories match on `url`/`title`.
Structures - Categories
Batch Create/Update Structure Categories
/services/websites/v1/structures/{type}/categories/batch
Auth
Sync batch support: if sync_batch is provided, all categories for this website+type get sync_batch=NULL first, then each synced category gets the batch value. Post-sync cleanup archives categories with NULL sync_batch.
Sync Cleanup — Archive categories not touched in the current sync batch
/services/websites/v1/structures/{type}/categories/sync-cleanup
Auth
Create Structure Category
/services/websites/v1/structures/{type}/categories/create
Auth
List Structure Categories
/services/websites/v1/structures/{type}/categories/all
Auth
Get Structure Category
/services/websites/v1/structures/{type}/categories/get
Auth
Edit Structure Category
/services/websites/v1/structures/{type}/categories/edit
Auth
Delete Structure Category
/services/websites/v1/structures/{type}/categories/delete
Auth
Structures - Dynamic
Batch Create/Update Dynamic Structures
/services/websites/v1/structures/{type}/batch
Auth
Accepts an array of items. Each item with 'id' is updated, items without 'id' are created. Runs in a single transaction for performance (~50x faster than individual calls). Security: validates every item's fields, scopes all queries to the authenticated project, and validates URL uniqueness.
Sync Cleanup — Archive items not touched in the current sync batch
/services/websites/v1/structures/{type}/sync-cleanup
Auth
After a sync, call this with the sync_batch timestamp. Items where sync_batch IS NULL (not touched) get archived.
Create Dynamic Structure
/services/websites/v1/structures/{type}/create
Auth
List Dynamic Structures
/services/websites/v1/structures/{type}/all
Auth
Get Dynamic Structure
/services/websites/v1/structures/{type}/get
Auth
Edit Dynamic Structure
/services/websites/v1/structures/{type}/edit
Auth
Delete Dynamic Structure
/services/websites/v1/structures/{type}/delete
Auth
Templates
Create Template
/services/websites/v1/templates/create
Auth
List Templates
/services/websites/v1/templates/all
Auth
Edit Template
/services/websites/v1/templates/edit
Auth
Get Template
/services/websites/v1/templates/get
Auth
Archive Template
/services/websites/v1/templates/archive
Auth
Delete Template
/services/websites/v1/templates/delete
Auth
Templates (cross-project)
Clone a template/partial from one project to another
/services/websites/v1/templates/clone
Auth
Themes
Get Theme Marketplace - Browse available themes
/services/websites/wemasy/themes/marketplace
Public
Returns one theme per family with latest version details
Get Template Library - Theme templates for Plus button
/services/websites/v1/themes/templates/library
Auth
GET /api/v1/templates/library Returns theme templates for the Plus button modal in page builder. Shows templates from installed themes (grouped by theme). Infrastructure templates are now loaded from /templates/all endpoint. Decision 14: Template Library Integration
Get Theme Marketplace - Browse available themes
/services/websites/v1/themes/marketplace
Auth
Returns one theme per family with latest version details
Get Pages Library - Theme and infrastructure pages for creation
/services/websites/v1/pages/library
Auth
POST /api/services/websites/v1/pages/library
Preview Theme Installation Data (Pages and Structures)
/services/websites/v1/themes/installation-preview
Auth
POST /api/services/websites/v1/themes/installation-preview
Get Theme Layouts for Creation
/services/websites/v1/themes/layouts-for-creation
Auth
POST /api/services/websites/v1/themes/layouts-for-creation
Themes Theme Uninstallation
Uninstall Theme - Remove theme installation from project
/services/websites/v1/themes/uninstall
Auth
POST /api/services/websites/v1/themes/uninstall Handles two installation modes differently: - MANUAL: Simply deletes the project_themes record - SAMPLE_DATA: Returns error (TODO: Future implementation will handle page/layout cleanup)
Themes - User
Install Theme
/services/websites/v1/themes/install
Auth
POST /api/services/websites/v1/themes/install MODE 1 - MANUAL INSTALLATION: - Copies NOTHING during installation - Only creates project_themes pivot record (registers theme) - Layouts shown in popup when user creates layout: "From scratch" or "Get from theme" - Layouts copied on-demand only when user selects them MODE 2 - SAMPLE DATA INSTALLATION: - Copies user-selected pages + their associated layouts + content - Images replaced with placeholders using ThemeCloningService - Quick start approach
List Installed Themes
/services/websites/v1/themes/installed
Auth
POST /api/v1/themes/installed Returns all themes installed in the current project with their metadata, version information, and installation details. Supports minimal flag for lightweight responses: - minimal=true: Returns only theme name, version number, image, theme_id, version_id, is_active - minimal=false (default): Returns full theme data with stats and metadata
Themes - Versions
Get Version History for Theme (Marketplace)
/services/websites/v1/themes/versions
Auth
POST /api/services/websites/v1/themes/versions Returns approved, production-ready versions for marketplace display. Filters out dev versions, draft versions, and rejected versions. Each version is a separate project linked by parent_project_id.
Get Single Version Detail
/services/websites/v1/themes/version/detail
Auth
POST /api/services/websites/v1/themes/version/detail Returns details for a specific theme version by version_id. Used for installation modals where only one version's info is needed.
Get Version History for Theme Owner/Publisher
/services/websites/v1/themes/versions/manage
Auth
POST /api/services/websites/v1/themes/versions/manage Returns ALL versions for a theme (including dev, draft, pending, rejected). This is specifically for the theme owner to manage their versions. Unlike the marketplace API, this shows everything.
Update Selected Theme Version
/services/websites/v1/themes/versions/updated-selected
Auth
POST /api/services/websites/v1/themes/versions/select Stores the user's selected theme version in user meta. When no version is selected, the system will use the first version (ordered desc).
Create New Theme Version - Full Project Duplication with Dev Mode
/services/websites/v1/themes/versions/create
Auth
POST /api/services/websites/v1/themes/versions/create Creates a new version by duplicating the entire source project. Each version is an independent project with complete isolation. Dev Mode (Optional - 5% of advanced users): - When is_dev=true, only 'status' and 'theme_id' required - Dev versions NOT shown in marketplace - Only ONE dev version allowed per theme lineage - Only updates: theme_status, is_dev (inherits other fields from source) Production Version: - When is_dev=false or not provided, ALL marketplace fields required - Requires: version_name, description, theme_description, category, main_image, screenshots - Updates all marketplace metadata - Status 'draft' = work in progress, 'publish' = submit for admin approval
Resubmit Rejected Theme Version
/services/websites/v1/themes/versions/resubmit
Auth
POST /api/services/websites/v1/themes/versions/resubmit Updates a rejected or draft theme version and resubmits for approval. Cannot change: source_project_id, version Can update: status, theme_short_description, theme_description, release_notes, category, tags, main_image, screenshots
Edit Draft Theme Version
/services/websites/v1/themes/versions/edit
Auth
POST /api/services/websites/v1/themes/versions/edit Updates a draft theme version's marketplace metadata without changing approval status. Cannot change: source_project_id, version Can update: theme_short_description, theme_description, release_notes, category, tags, main_image, screenshots
Cancel Theme Version Submission
/services/websites/v1/themes/versions/cancel-submission
Auth
POST /api/services/websites/v1/themes/versions/cancel-submission Cancels a pending submission by reverting the theme version back to draft status. Sets theme_status = 'draft' and approval_status = NULL.
Delete Theme Version
/services/websites/v1/themes/versions/delete
Auth
POST /api/services/websites/v1/themes/versions/delete Deletes a theme version by soft-deleting the project. Only draft versions can be deleted. Cannot delete versions that are installed by any project or have child versions.
Deprecate Theme Version
/services/websites/v1/themes/versions/deprecate
Auth
POST /api/services/websites/v1/themes/versions/deprecate Marks a published theme version as deprecated by setting theme_status = 'deprecated'. Only versions with approval_status = 'approved' can be deprecated.
Website Redirections
List All Redirections
/services/websites/v1/redirects/all
Auth
Returns paginated redirections for the current website with search and sorting.
Get Redirection
/services/websites/v1/redirects/get
Auth
Returns a single redirection by ID for the current website.
Create Redirection
/services/websites/v1/redirects/create
Auth
Creates a new URL redirection for the current website.
Edit Redirection
/services/websites/v1/redirects/edit
Auth
Updates an existing URL redirection for the current website.
Delete Redirection
/services/websites/v1/redirects/delete
Auth
Soft-deletes a URL redirection for the current website.
Websites
Get Website
/services/websites/v1/websites/get
Auth
Update Website Customization
/services/websites/v1/websites/update/customization
Auth
Get Reuseable Customization
/services/websites/v1/websites/get/reuseable-customization
Auth
Create Website
/services/websites/v1/websites/create
Auth