> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # CreateProject # Package: sites # Namespace: ProjectsService # Method link: https://dev.wix.com/docs/api-reference/account-level/sites/projects/create-project.md ## Introduction Creates a project. You can optionally specify a template to base the project on and apps to install during creation. The response includes a `metaSiteId` that you can use to redirect users to their project dashboard at `https://manage.wix.com/dashboard/{metaSiteId}`. --- ## REST API ### Schema ``` Method: createProject Description: Creates a project. You can optionally specify a template to base the project on and apps to install during creation. The response includes a `metaSiteId` that you can use to redirect users to their project dashboard at `https://manage.wix.com/dashboard/{metaSiteId}`. URL: https://www.wixapis.com/v1/create Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: type Method parameters: param name: apps | type: array | description: Apps to install in the new project. - name: appDefId | type: string | description: GUID of the app to install. See [About Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/get-started/apps-created-by-wix.md) for a list of available App Definition GUIDs. param name: folderId | type: folderId | description: Dashboard folder GUID where the project is placed in the **Sites** section of the Wix Studio Workspace. param name: name | type: name | description: Project name displayed in the project dashboard. param name: templateId | type: templateId | description: GUID of a template to base the new project on. See [Site Template GUIDs](https://dev.wix.com/docs/api-reference/account-level/sites/project-v1/site-template-ids.md) for examples. Default: blank template param name: type | type: Type | required: true - enum: UNKNOWN - Unknown project type. WIX - Standard [Wix site](https://manage.wix.com/studio/sites?viewId=all-items-view) with a frontend built using Wix Editor or Wix Studio. HEADLESS - [Headless project](https://dev.wix.com/docs/go-headless.md) that creates a site using Wix's backend services with a custom frontend implementation. BRANDED_APP - Native mobile app created with [Wix's app builder](https://www.wix.com/app-builder). Return type: CreateProjectResponse - name: project | type: Project | description: Created project. - name: metaSiteId | type: string | description: Project GUID. Use this GUID to access the project dashboard. - name: siteId | type: string | description: Site GUID. The GUID of the project's visual site component. - name: templateId | type: string | description: GUID of the template used to create this project. Defaults to a blank template if no template was specified. - name: apps | type: array | description: Apps installed on this project. - name: appDefId | type: string | description: GUID of the app to install. See [About Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/get-started/apps-created-by-wix.md) for a list of available App Definition GUIDs. ``` ### Examples ### Create a Wix site ```curl curl -X POST \ 'https://www.wixapis.com/funnel/projects/v1/create' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -H 'wix-account-id: ' \ -d '{ "type": "WIX", "name": "My Agency Client Site", "templateId": "96fabb5c-dd03-4ff5-8e77-c5df952c1bc5", "apps": [ { "appDefId": "1380b703-ce81-ff05-f115-39571d94dfcd" }, { "appDefId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97" } ] }' ``` ### Create a Headless project ```curl curl -X POST \ 'https://www.wixapis.com/funnel/projects/v1/create' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -H 'wix-account-id: ' \ -d '{ "type": "HEADLESS", "name": "My Headless Backend", "apps": [ { "appDefId": "1380b703-ce81-ff05-f115-39571d94dfcd" } ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.sites.ProjectsService.createProject(type, options) Description: Creates a project. You can optionally specify a template to base the project on and apps to install during creation. The response includes a `metaSiteId` that you can use to redirect users to their project dashboard at `https://manage.wix.com/dashboard/{metaSiteId}`. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: type Method parameters: param name: options | type: CreateProjectOptions none - name: name | type: string | description: Project name displayed in the project dashboard. - name: templateId | type: string | description: GUID of a template to base the new project on. See [Site Template GUIDs](https://dev.wix.com/docs/api-reference/account-level/sites/project-v1/site-template-ids.md) for examples. Default: blank template - name: folderId | type: string | description: Dashboard folder GUID where the project is placed in the **Sites** section of the Wix Studio Workspace. - name: apps | type: array | description: Apps to install in the new project. - name: appDefId | type: string | description: GUID of the app to install. See [About Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/get-started/apps-created-by-wix.md) for a list of available App Definition GUIDs. param name: type | type: Type | required: true - enum: UNKNOWN - Unknown project type. WIX - Standard [Wix site](https://manage.wix.com/studio/sites?viewId=all-items-view) with a frontend built using Wix Editor or Wix Studio. HEADLESS - [Headless project](https://dev.wix.com/docs/go-headless.md) that creates a site using Wix's backend services with a custom frontend implementation. BRANDED_APP - Native mobile app created with [Wix's app builder](https://www.wix.com/app-builder). Return type: PROMISE - name: project | type: Project | description: Created project. - name: metaSiteId | type: string | description: Project GUID. Use this GUID to access the project dashboard. - name: siteId | type: string | description: Site GUID. The GUID of the project's visual site component. - name: templateId | type: string | description: GUID of the template used to create this project. Defaults to a blank template if no template was specified. - name: apps | type: array | description: Apps installed on this project. - name: appDefId | type: string | description: GUID of the app to install. See [About Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/get-started/apps-created-by-wix.md) for a list of available App Definition GUIDs. ``` ### Examples ### createProject ```javascript import { projects } from '@wix/projects'; async function createProject(type,options) { const response = await projects.createProject(type,options); }; ``` ### createProject (with elevated permissions) ```javascript import { projects } from '@wix/projects'; import { auth } from '@wix/essentials'; async function myCreateProjectMethod(type,options) { const elevatedCreateProject = auth.elevate(projects.createProject); const response = await elevatedCreateProject(type,options); } ``` ### createProject (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { projects } from '@wix/projects'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { projects }, // Include the auth strategy and host as relevant }); async function createProject(type,options) { const response = await myWixClient.projects.createProject(type,options); }; ``` ---