> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Publish a Site Without a Wix Account

## Article: Publish a Site Without a Wix Account

## Article Link: https://dev.wix.com/docs/api-reference/account-level/sites/skills/publish-a-site-without-a-wix-account.md

## Article Content:

# Publish a Site Without a Wix Account

A shell that reaches `https://www.wixapis.com` can publish a static site with no
Wix login. The site goes live on a `*.wix-site-host.com` URL and lasts one hour
from its creation unless the user claims it; after that every call on it returns
`404`.

Publish static files: HTML, CSS, JavaScript and assets, up to 20 MiB in all,
with an `index.html` at the top level when there is more than one HTML file.
Build a project first and publish its output. A Wix Astro build is released
with a login: [Upload a Website or HTML Files](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#release-a-wix-astro-build*original::upload-static-site.md#release-a-wix-astro-build).

## Publish

Generate one UUID as `anonymousId` and create the site once, not per edit:

```bash
# 1. Create: returns { metaSiteId, projectId }
curl -sS -X POST "https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID"

# 2. Upload the complete file set: returns { uploadId }; not live yet
curl -sS -X POST \
  "https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/upload?campaign=mcp&agent=$AGENT" \
  -F "files=@index.html;filename=index.html" -F "files=@assets/styles.css;filename=assets/styles.css"

# 3. Release: returns { siteUrl }
curl -sS -X POST \
  "https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/release" \
  -H 'Content-Type: application/json' -d "{\"uploadId\":\"$UPLOAD_ID\"}"
```

Keep `anonymousId`, `metaSiteId` and `projectId`, and put their values in every
later URL, not placeholders. Open `siteUrl` and check the pages.

## Hand it to the user

Give the live site, `{siteUrl}`, and the claim link, each on its own line:
`https://www.wix.com/live-headless-site/{projectId}?anonymousId={anonymousId}`.
The site lasts one hour unless the user claims it, and then moves to a new
address. **Whoever opens the link while signed in gets the site; give it only to
the user.** Never create an account or sign in for them.

## Publish changes

```bash
# Status: 200 { metaSiteId, projectId, createdAt } while unclaimed
curl -sS "https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID"

# The live files, when you have no copy
curl -sS -o site.zip "https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/download.zip"
```

- `200`: upload and release again with the same IDs and every file, changed and
  unchanged; a release replaces the whole site. Leave the zip's
  `wix.config.json` out. The address stays the same.
- `404`: the site was claimed or its hour ended. With the user's login, the
  HEADLESS site query in [Find an existing site](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#find-an-existing-site*original::upload-static-site.md#find-an-existing-site)
  finds a claimed site; change it through [Change it later](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#change-it-later*original::upload-static-site.md#change-it-later).
  An ended site is gone: say so and ask before creating another.

## Claim it

Claiming moves the site into a Wix account and to a new address; the old
address stops working. Claim after the last anonymous release, in one of three
ways:

- **The claim link:** the user opens it in their own browser and signs in or
  signs up.
- **The Wix MCP** (`ExecuteWixAPI` in your tool list): `POST
  https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/{anonymousId}/{metaSiteId}/claim`
  with body `{}`, through `wix.request({ scope: 'account', ... })`. The site
  goes to the account the MCP is signed in as.
- **The Wix CLI:** the user approves `npx @wix/cli@latest login` in their
  browser; `npx @wix/cli@latest token` then gives a token that lasts 15
  minutes, and the same `POST` with `Authorization: Bearer $ACCESS_TOKEN`
  claims the site into that account.

The claim call returns `{}`. Read the site's new `viewUrl` with the HEADLESS
site query in [Find an existing site](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#find-an-existing-site*original::upload-static-site.md#find-an-existing-site)
and give it with the site's dashboard link, as
[Verify and report](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#verify-and-report*original::upload-static-site.md#verify-and-report) says. Later changes
need the user's login: [Change it later](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#change-it-later*original::upload-static-site.md#change-it-later).

## When no shell reaches Wix

The user drags the files onto [the drop page](https://github.com/wix/skills/blob/fb9e023014e489f693cf58b5b70aa26cf4be42bc/skills/wix-manage/references/sites/upload-static-site.md#the-drop-page*original::upload-static-site.md#the-drop-page)
in their own browser; the site goes live the same way and the page offers to
keep it.

## Failures

| Failure | Action |
| --- | --- |
| `400` with `MISSING_INDEX_HTML`, `FILE_TOO_LARGE`, `TOTAL_TOO_LARGE` | Read `details.applicationError.code` and fix the files. |
| `404` on any call | The site was claimed or its hour ended: see [Publish changes](#publish-changes). |

Offer [feedback to Wix](https://dev.wix.com/docs/api-reference/account-level/sites/skills/send-feedback-to-wix.md) when a step fails or guidance
is missing.