Create Headless Site
Headless sites are not created from templates. One account-level call creates the site, installs the requested Wix Business Solution apps, and creates and configures the site's OAuth client.
Do NOT use the Create Site from Template API for headless sites — it only tags the site's namespace and skips the headless setup entirely.
Prerequisites
- Wix account with site creation permissions
- Account-level API access
Provision a Headless Business
Endpoint: POST https://www.wixapis.com/headless-business-setup/v1/headless-business/provision
Request Body:
{
"newMetasite": {
"namingStrategy": { "metaSiteName": "My Headless Business" },
"seedOptions": [
{ "businessSolution": "STORES", "clearTemplateContent": true, "seedDemoContent": false }
]
},
"synchronousSteps": ["SET_METASITE_NAME", "CONFIGURE_HEADLESS_APP"]
}namingStrategy— exactly one of:metaSiteName(exact display name),llmPromptBasedName: {}(name derived from the top-levelpromptfield), ordefaultName: {}seedOptions— Wix Business Solution apps to install at creation:STORES,BLOG,BOOKINGS,EVENTS,PORTFOLIO,PRICING_PLANS. Each entry takesclearTemplateContent(remove sample content) andseedDemoContent(seed demo content). Empty installs nonesynchronousSteps— steps to complete before the call returns:SET_METASITE_NAME,CONFIGURE_HEADLESS_APP,SEED_CONTENT. Omitted steps run asynchronously. IncludeCONFIGURE_HEADLESS_APPwhen the OAuth client must be usable immediately
Response:
{ "metaSiteId": "<SITE_ID>", "appId": "<OAUTH_CLIENT_ID>" }appId is the site's OAuth client ID — do NOT create a separate OAuth app.
Existing Sites
To provision headless onto an existing site, pass "existingMetasite": {} instead of newMetasite. This is a site-level call in the context of that site.
Next Steps
After creating the site:
- Install additional apps using Install Wix Apps
- Add content (products, services, blog posts, etc.)
- Use the
appIdas theclient_idto mint visitor tokens and make buyer-facing API calls — see Manage OAuth Apps