Website Builder API

Create your site without code

Base URL: https://api.wemasy.nl/api
ⓘ Settings are saved in browser localStorage for convenience. Don't use production tokens on shared computers.

Admin Themes Actions

Approve Theme Version

POST /services/websites/v1/admin/themes/{themeProjectId}/approve Auth

Requires superadmin access. Approves a theme version (project), allowing it to appear in the marketplace. Requires admin privileges.

Reject Theme Version

POST /services/websites/v1/admin/themes/{themeProjectId}/reject Auth

Requires superadmin access. Rejects a theme version (project), preventing it from appearing in the marketplace. Requires admin privileges and a rejection reason.

List All Themes

POST /services/websites/v1/admin/themes/list Auth

Requires superadmin access. Returns theme versions (projects) with pagination and counts for all statuses. Requires admin privileges.

Blocks

Create Block

POST /services/websites/v1/blocks/create Auth

List Blocks

POST /services/websites/v1/blocks/all Auth

Get Block

POST /services/websites/v1/blocks/get Auth

Edit Block

POST /services/websites/v1/blocks/edit Auth

Delete Block

POST /services/websites/v1/blocks/delete Auth

Set Block Content

POST /services/websites/v1/blocks/set-content Auth

Components

Create Component

POST /services/websites/v1/components/create Auth

Note: This endpoint is not used anywhere currently.

Add Component to Block

POST /services/websites/v1/components/add-to Auth

Change Component Type

POST /services/websites/v1/components/change-to Auth

Delete Component

POST /services/websites/v1/components/delete Auth

Set Component Content

POST /services/websites/v1/components/set-content Auth

Update Component Order

POST /services/websites/v1/components/update-order Auth

Duplicate Component

POST /services/websites/v1/components/duplicate Auth

Unlink Component

POST /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

POST /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

POST /services/websites/v1/components/paste Auth

Export Component

POST /services/websites/v1/components/export Auth

Import Component

POST /services/websites/v1/components/import Auth

Update Custom Fields

POST /services/websites/v1/components/update-custom-fields Auth

Deployment

Download a specific website version with signature validation

GET /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

POST /services/websites/v1/websites/deploy Auth

Get Deployment Status

POST /services/websites/v1/websites/deployment/status Auth

Get Domain Status

POST /services/websites/v1/websites/deployment/domain/status Auth

Update Deployment Domain

POST /services/websites/v1/websites/deployment/domain/update Auth

Check Domain DNS

POST /services/websites/v1/websites/deployment/domain/dns-check Auth

Reset Deployment

POST /services/websites/v1/websites/reset-deployment Auth

Cancel Deployment

POST /services/websites/v1/websites/cancel-deployment Auth

Get Publish Data

POST /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

POST /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

POST /services/websites/v1/websites/download-version Auth

Download Deployment Logs or Results

POST /services/websites/v1/websites/download-generation-file Auth

Setup Wemasy Domain

POST /services/websites/v1/websites/setup-wemasy-domain Auth

Saves wemasy domain to projects table and optionally switches to it

Switch Domain Type

POST /services/websites/v1/websites/switch-domain-type Auth

Switches active domain between custom and wemasy

Check DNS Propagation (API Endpoint)

POST /services/websites/v1/websites/check-domain-propagation Auth

Checks immediately and dispatches background job for automatic checking if not verified

Confirm DNS Records Added

POST /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

POST /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

POST /services/websites/v1/files/get/visitor-signed-url Public

Get Uploaded Files

POST /services/websites/v1/files/visitor-get Public

Delete Uploaded File

POST /services/websites/v1/files/visitor-delete Public

Get Large File Upload Signed URL

POST /services/websites/v1/files/get/signed-url Auth

Get Large Uploaded Files

POST /services/websites/v1/files/get Auth

Delete Large Uploaded File

POST /services/websites/v1/files/delete Auth

Layouts

Create Layout

POST /services/websites/v1/layouts/create Auth

Create Layout from Theme

POST /services/websites/v1/layouts/create-from-theme Auth

POST /api/services/websites/v1/layouts/create-from-theme

List Layouts

POST /services/websites/v1/layouts/all Auth

Edit Layout

POST /services/websites/v1/layouts/edit Auth

Get Layout

POST /services/websites/v1/layouts/get Auth

Update Layout Templates

POST /services/websites/v1/layouts/update-templates Auth

Archive Layout

POST /services/websites/v1/layouts/archive Auth

Delete Layout

POST /services/websites/v1/layouts/delete Auth

Menus

List Menus

POST /services/websites/v1/menus/all Auth

Menus Get

POST /services/websites/v1/menus/get Auth

Edit Menu

POST /services/websites/v1/menus/edit Auth

Create Menu

POST /services/websites/v1/menus/create Auth

Delete Menu

POST /services/websites/v1/menus/delete Auth

Pages

List Pages

POST /services/websites/v1/pages/all Auth

Create Page

POST /services/websites/v1/pages/create Auth

Create Page from Source (Theme or Infrastructure)

POST /services/websites/v1/pages/create-from-source Auth

POST /api/services/websites/v1/pages/create-from-source

Get Page

POST /services/websites/v1/pages/get Auth

Edit Page

POST /services/websites/v1/pages/edit Auth

Update Page Template

POST /services/websites/v1/pages/update-template Auth

Archive Page

POST /services/websites/v1/pages/archive Auth

Delete Page

POST /services/websites/v1/pages/delete Auth

Duplicate Page

POST /services/websites/v1/pages/duplicate Auth

Export Page

POST /services/websites/v1/pages/export Auth

Import Page

POST /services/websites/v1/pages/import Auth

Preview Designer Data

Get Secured Page Designer

POST /services/websites/v1/secured/page-designer/get Public

Get Page Designer Data

POST /services/websites/v1/page-designer/get Auth

Project Duplicate

Duplicate Project

POST /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.

Public

Handle Redirection

GET /services/websites/v1/redirect Public

Submit Form

POST /services/websites/v1/forms/submit Public

Download Signed File

GET /services/websites/v1/download Public

Report Page Not Found

POST /services/websites/v1/404 Public

Search Content

POST /services/websites/v1/search Public

Register Onboarding User

POST /services/websites/v1/onboarding/user/new Public

Rate limit: 100 requests per minute.

Confirm Onboarding User

POST /services/websites/v1/onboarding/user/confirm Public

Rate limit: 100 requests per minute.

Resend Verification Email

POST /services/websites/v1/onboarding/user/resent-verification Public

Settings

Get Product Pricing List

POST /services/websites/v1/pricing Public

Get Product Pricing List

POST /services/websites/auth/v1/pricing Auth

Get All Available Pages

POST /services/websites/v1/pages/available-indexed Auth

Returns all indexable content (pages, structures, webshop items) where no_index is 0 or null

List Forms

POST /services/websites/v1/forms/all Auth

Get all available Google Fonts

POST /services/websites/v1/fonts/all Auth

Manually trigger thumbnail regeneration for a page, template, or layout

POST /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

POST /services/websites/v1/scheduled/count Auth

Structures

Create Structure

POST /services/websites/v1/structures/create Auth

List Structures

POST /services/websites/v1/structures/all Auth

Get Structure

POST /services/websites/v1/structures/get Auth

Edit Structure

POST /services/websites/v1/structures/edit Auth

Delete Structure

POST /services/websites/v1/structures/delete Auth

Structures - Categories

Create Structure Category

POST /services/websites/v1/structures/{type}/categories/create Auth

List Structure Categories

POST /services/websites/v1/structures/{type}/categories/all Auth

Get Structure Category

POST /services/websites/v1/structures/{type}/categories/get Auth

Edit Structure Category

POST /services/websites/v1/structures/{type}/categories/edit Auth

Delete Structure Category

POST /services/websites/v1/structures/{type}/categories/delete Auth

Structures - Dynamic

Create Dynamic Structure

POST /services/websites/v1/structures/{type}/create Auth

List Dynamic Structures

POST /services/websites/v1/structures/{type}/all Auth

Get Dynamic Structure

POST /services/websites/v1/structures/{type}/get Auth

Edit Dynamic Structure

POST /services/websites/v1/structures/{type}/edit Auth

Delete Dynamic Structure

POST /services/websites/v1/structures/{type}/delete Auth

Templates

Create Template

POST /services/websites/v1/templates/create Auth

List Templates

POST /services/websites/v1/templates/all Auth

Edit Template

POST /services/websites/v1/templates/edit Auth

Get Template

POST /services/websites/v1/templates/get Auth

Archive Template

POST /services/websites/v1/templates/archive Auth

Delete Template

POST /services/websites/v1/templates/delete Auth

Themes

Get Theme Marketplace - Browse available themes

GET /services/websites/wemasy/themes/marketplace Public

Returns one theme per family with latest version details

Get Template Library - Theme templates for Plus button

POST /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

POST /services/websites/v1/themes/marketplace Auth

Returns one theme per family with latest version details

Get Pages Library - Theme and infrastructure pages for creation

POST /services/websites/v1/pages/library Auth

POST /api/services/websites/v1/pages/library

Preview Theme Installation Data (Pages and Structures)

POST /services/websites/v1/themes/installation-preview Auth

POST /api/services/websites/v1/themes/installation-preview

Get Theme Layouts for Creation

POST /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

POST /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

POST /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

POST /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)

POST /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

POST /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

POST /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

POST /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

POST /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

POST /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

POST /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

POST /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

POST /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

POST /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.

Websites

Get Website

POST /services/websites/v1/websites/get Auth

Update Website Customization

POST /services/websites/v1/websites/update/customization Auth

Get Reuseable Customization

POST /services/websites/v1/websites/get/reuseable-customization Auth

Create Website

POST /services/websites/v1/websites/create Auth