This recipe guides you through creating a new Wix site from a template, including template selection and optional publishing.
GET https://www.wix.com/_api/template-cms-view-service/view/v2/templates/searchPOST https://www.wixapis.com/msm/v1/meta-site/create-from-templatePOST https://www.wixapis.com/site-publisher/v1/site/publishBefore searching templates, gather information:
If user wants an empty/blank site:
fe86a14e-ef67-49b4-a409-d086f3abaa1ab55bdf43-95e0-4cef-b9bb-92dcc7af2742Skip to Step 3 with these template IDs.
Endpoint: GET https://www.wix.com/_api/template-cms-view-service/view/v2/templates/search
Query Parameters:
| Parameter | Description | Values |
|---|---|---|
language | Always use | en |
limit | Results per page | 24 |
offset | Pagination offset | Start at 0, increment by 24 |
bookType | Editor type | studio or main-v2 |
query | Search keywords | yoga+studio, ecommerce, etc. |
Example Request:
Response includes for each template:
metaSiteId - Template ID for creationtemplateSlug - For preview URLFor each relevant template, show:
https://www.wix.com/website-template/view/html/{templateSlug}Endpoint: POST https://www.wixapis.com/msm/v1/meta-site/create-from-template
Request Body:
Request:
The siteName must follow these rules:
[a-z0-9_-]{4,20}If siteName is not provided, one is generated automatically.
Add "namespace": "HEADLESS" to the request body:
Response includes the new site's metaSiteId.
namespace fieldAsk the user if they want to publish their site before proceeding.
Endpoint: POST https://www.wixapis.com/site-publisher/v1/site/publish
This is a site-level API - use the site ID from the creation response.
Request:
If the site was created as headless, you MUST create an OAuth app for authentication.
See Create OAuth App documentation.
This is a site-level call in the context of the newly created site.
For quick access without searching:
| Type | Template ID |
|---|---|
| Blank (Studio) | fe86a14e-ef67-49b4-a409-d086f3abaa1a |
| Blank (Editor) | b55bdf43-95e0-4cef-b9bb-92dcc7af2742 |
| Store | b783f9f9-4f4d-4139-9659-cc95a51b9ee5 |
| Bookings/Services | 17b2bf9e-8661-4c92-973c-67502b415e58 |
| Beauty | 0281d415-0682-42ac-b35e-49b349f19332 |
After creating the site: