@wix/agent-skills 1.19.0 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +33 -31
- package/skills/wix-app/references/DASHBOARD_PAGE.md +6 -10
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +17 -8
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +53 -131
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +1 -2
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +88 -73
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +46 -22
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +20 -6
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +9 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +71 -31
- package/skills/wix-app/references/editor-react-component/PARTS.md +5 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -5
- package/skills/wix-app/scripts/pkg-root.cjs +73 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +310 -40
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +118 -24
- package/skills/wix-app/scripts/scan-a11y-render.cjs +551 -0
- package/skills/wix-app/scripts/scan-a11y-review.cjs +373 -0
- package/skills/wix-base44-connector/SKILL.md +67 -43
- package/skills/wix-base44-connector/scripts/utils.cjs +39 -3
- package/skills/wix-docs/SKILL.md +47 -20
- package/skills/wix-headless/SKILL.md +1 -0
- package/skills/wix-headless/entry/bootstrap.mjs +106 -50
- package/skills/wix-headless/entry/skill.md +5 -3
- package/skills/wix-headless/references/CAPABILITIES.md +7 -2
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -1
- package/skills/wix-headless/references/inline-recipes/experience-store.md +48 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +350 -114
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +1 -1
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +25 -5
- package/skills/wix-headless/references/managed/CREATE.md +5 -0
- package/skills/wix-headless-fast/SKILL.md +25 -7
- package/skills/wix-headless-fast/entry/skill.md +23 -14
- package/skills/wix-headless-fast/install/fast-path.mjs +48 -5
- package/skills/wix-headless-fast/install/pin-agents-md.mjs +57 -0
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +3 -3
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +204 -35
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +146 -36
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +8 -2
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +95 -20
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +21 -2
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +104 -18
- package/skills/wix-manage/SKILL.md +16 -10
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +4 -1
- package/skills/wix-manage/references/bookings/create-appointment-service.md +3 -1
- package/skills/wix-manage/references/bookings/create-class-service.md +3 -1
- package/skills/wix-manage/references/bookings/create-course-service.md +4 -2
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +68 -3
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-seasonal-promotion.md +1 -1
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +3 -3
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +8 -8
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +4 -4
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +1 -1
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +9 -9
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +108 -14
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +7 -7
- package/skills/wix-manage/references/seo/manage-content-plan.md +182 -136
- package/skills/wix-manage/references/seo/manage-google-search-console.md +272 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +283 -0
- package/skills/wix-manage/references/stores/change-store-currency.md +1 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +3 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +3 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +69 -27
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +32 -14
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +14 -3
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +41 -35
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +77 -30
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +31 -2
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +31 -6
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +0 -80
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +0 -140
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +0 -112
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +0 -100
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +0 -130
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +0 -48
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +0 -66
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +0 -103
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +0 -56
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +0 -23
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Manage Google Search Console for a Wix Site"
|
|
3
|
+
description: "Connect a Wix site to Google Search Console and drive its setup through the public GSC Connection and Site Readiness APIs: check connection and readiness, start the Google authorization, verify ownership, add the property, submit the sitemap, request indexing, read search performance, run URL inspection, recover a stale connection, or disconnect. The site owner authorizes in their own browser via a single-use connect URL."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Manage Google Search Console for a Wix Site
|
|
7
|
+
|
|
8
|
+
The **GSC Connection API** links a Google account to the site. The **GSC Site
|
|
9
|
+
Readiness API** acts through that account: verifies ownership, adds the Search
|
|
10
|
+
Console property, submits the sitemap, requests indexing, reads search performance
|
|
11
|
+
and URL inspection. Both select the site from the caller's authorization context
|
|
12
|
+
and take no site ID. Use the site already selected in the environment. If none is
|
|
13
|
+
selected, list the available sites. Select the only site automatically; if several
|
|
14
|
+
are available, ask the user to choose by name before making site-specific calls.
|
|
15
|
+
Never invent a site ID or ask the user to type one.
|
|
16
|
+
|
|
17
|
+
All endpoints are under `https://www.wixapis.com`: Connection calls under
|
|
18
|
+
`/gsc/connection/v1`, everything else under `/gsc/v1`.
|
|
19
|
+
|
|
20
|
+
## Start every task with two reads
|
|
21
|
+
|
|
22
|
+
Both are side-effect free. Do them before describing the site's state.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
GET https://www.wixapis.com/gsc/connection/v1/connection
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{ "connection": { "status": "VALID", "connectedEmailMasking": "m*******@gmail.com", "ownedByCaller": true } }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
GET https://www.wixapis.com/gsc/v1/site-readiness
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{ "siteReadiness": { "status": "NOT_READY", "blockingReason": "SITE_OWNER_NOT_VERIFIED" } }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Read them together:
|
|
41
|
+
|
|
42
|
+
| `connection.status` | `siteReadiness` | Meaning | Next |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| `NOT_CONNECTED` | `NOT_READY` / `SITE_OWNER_NOT_VERIFIED` | No Google account linked | Connect (below) |
|
|
45
|
+
| `PENDING` | any | An authorization attempt is open | Ask the user to finish it in their browser, do not start another |
|
|
46
|
+
| `VALID` | `READY` | Connected and verified | Property steps if the user wants them |
|
|
47
|
+
| `VALID` | `NOT_READY` / `SITE_OWNER_NOT_VERIFIED` | Connected, not verified | Verify Site |
|
|
48
|
+
| `INVALID` | `NOT_READY` / `TOKEN_INVALID` | Credentials rejected by Google | Reconnect |
|
|
49
|
+
| `VALID` | `NOT_READY` / `DOMAIN_MISSING` | No connected domain | User connects a domain first |
|
|
50
|
+
|
|
51
|
+
`blockingReason` is `UNKNOWN_BLOCKING_REASON` when the status is `READY`; not an
|
|
52
|
+
error. Treat an unrecognized reason as "not ready, no known next action".
|
|
53
|
+
|
|
54
|
+
`READY` covers connection and verification only. Whether the property was added,
|
|
55
|
+
the sitemap submitted, or indexing requested comes from **List Events**.
|
|
56
|
+
|
|
57
|
+
## `VALID` can be stale, and `MISSING_TOKEN` means reconnect
|
|
58
|
+
|
|
59
|
+
`INVALID` is only written when a real call to Google is rejected, so a site nobody
|
|
60
|
+
has queried since its credentials broke keeps reporting `VALID`. The tell arrives
|
|
61
|
+
on the first Google-facing call:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{ "message": "FAILED_PRECONDITION: Missing Token", "details": { "applicationError": { "code": "MISSING_TOKEN" } } }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The reference describes `MISSING_TOKEN` as "no Google account is connected"; it
|
|
68
|
+
also fires when the stored credentials are gone while Get Connection still said
|
|
69
|
+
`VALID`. Either way: the Google account must be reconnected. Do not retry, and do
|
|
70
|
+
not tell the user the site is connected.
|
|
71
|
+
|
|
72
|
+
## Connect a Google account
|
|
73
|
+
|
|
74
|
+
Get Connect URL is `GET`, but it **writes**: every call starts a new single-use
|
|
75
|
+
authorization attempt (two-hour expiry) and Get Connection reports `PENDING` while
|
|
76
|
+
it is open. Use Get Connection to check connection status. Call Get Connect URL
|
|
77
|
+
when starting a connection or reconnection attempt; while the user completes that
|
|
78
|
+
attempt, use Get Connection for status checks. Request a new URL when a new attempt
|
|
79
|
+
is needed, such as after expiry. On an already-connected site it is allowed: the
|
|
80
|
+
same Google account refreshes the credentials, a different one replaces the
|
|
81
|
+
connection. Say which before you do it.
|
|
82
|
+
|
|
83
|
+
1. Read Get Connection. If `VALID`, stop unless the user wants to reconnect.
|
|
84
|
+
2. Call [Get Connect URL](https://dev.wix.com/docs/api-reference/business-management/seo/google-search-console/connection-v1/get-connect-url). The request takes no parameters or body.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
GET https://www.wixapis.com/gsc/connection/v1/connect-url
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{ "connectUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=407408718192.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fwww.wixapis.com%2Fgsc%2Fconnection%2Fv1%2Fconnect-callback&response_type=code&scope=openid%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters&state=EXAMPLE_STATE" }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The response above is illustrative. Wix generates the authorization URL,
|
|
95
|
+
including its OAuth query parameters. Give the user the exact returned
|
|
96
|
+
`connectUrl`; do not construct, modify, or reuse the example URL.
|
|
97
|
+
|
|
98
|
+
3. Give the URL to the user and ask them to tell you when they have finished. Wix
|
|
99
|
+
completes the exchange server-side; there is no code to send back.
|
|
100
|
+
4. When the user says they are done, read Get Connection once and confirm `VALID`.
|
|
101
|
+
Do not poll while waiting. If it is still `PENDING`, the user has not finished;
|
|
102
|
+
if the attempt expired (two hours), request a fresh URL only after they agree.
|
|
103
|
+
|
|
104
|
+
## Writes need a published, indexable site with a connected domain
|
|
105
|
+
|
|
106
|
+
Get Connect URL, Verify Site, Add Site, and Submit Sitemap fail with
|
|
107
|
+
`FAILED_PRECONDITION` until the site is published, has a connected (premium)
|
|
108
|
+
domain, and allows indexing. The code names the first failing check:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{ "message": "FAILED_PRECONDITION: The site has no connected domain. Connect a domain before connecting the site to Google Search Console",
|
|
112
|
+
"details": { "applicationError": { "code": "DOMAIN_NOT_CONNECTED" } } }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Codes: `SITE_NOT_PUBLISHED`, `DOMAIN_NOT_CONNECTED`, `SITE_NOT_INDEXABLE`. A free
|
|
116
|
+
site on a `wixsite.com` address cannot complete these writes. Report the missing
|
|
117
|
+
prerequisite and stop. When listing sites to find one that qualifies, filter for
|
|
118
|
+
premium sites with a connected domain.
|
|
119
|
+
|
|
120
|
+
## Set the site up in Search Console
|
|
121
|
+
|
|
122
|
+
Run the steps the user asked for, in this order, confirming before each write.
|
|
123
|
+
Bodies are empty unless shown.
|
|
124
|
+
|
|
125
|
+
| Step | Call | Notes |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| Verify ownership | `POST /gsc/v1/verify-site` with `{ "method": "META" }` | Synchronous against Google, allow up to 60 s. Idempotent. Wix already places the meta tag. |
|
|
128
|
+
| Add the property | `POST /gsc/v1/add-site` | Requires a verified site. |
|
|
129
|
+
| Submit the sitemap | `POST /gsc/v1/submit-sitemap` | Wix hosts and generates the sitemap. Google processes it asynchronously. |
|
|
130
|
+
| Request indexing | `POST /gsc/v1/request-site-indexing` | Success means Google accepted the request, not that the site is indexed. |
|
|
131
|
+
| Request one page | `POST /gsc/v1/request-page-indexing` with `{ "url": "https://www.example.com/about" }` | Full URL of a page on this site. |
|
|
132
|
+
|
|
133
|
+
All succeed with `{}`. Re-read Get Site Readiness after each step and act on the
|
|
134
|
+
current `blockingReason`. Verify Site on an already-verified site returns `{}` and
|
|
135
|
+
re-stamps the `SITE_VERIFIED` event date: safe, but not a change to report.
|
|
136
|
+
|
|
137
|
+
Two Google-side failures are retryable. `RESOURCE_EXHAUSTED` (`GOOGLE_QUOTA_EXCEEDED`):
|
|
138
|
+
the quota is daily, tell the user to retry tomorrow. `UNAVAILABLE`
|
|
139
|
+
(`GOOGLE_UNAVAILABLE`): retry once after a few seconds. On any other error your next
|
|
140
|
+
message is the final response: name the step that failed and the error code, and
|
|
141
|
+
make no further Search Console calls.
|
|
142
|
+
|
|
143
|
+
## Check what was done: List Events and List Sitemaps
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
GET https://www.wixapis.com/gsc/v1/events
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{ "events": [
|
|
151
|
+
{ "eventType": "ACCOUNT_CONNECTED", "occurredDate": "2025-10-29T11:10:15.869Z" },
|
|
152
|
+
{ "eventType": "SITE_VERIFIED", "occurredDate": "2026-09-07T11:39:31.992Z" },
|
|
153
|
+
{ "eventType": "SITE_ADDED", "occurredDate": "2025-10-29T11:07:39.050Z" } ] }
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
One entry per event type with the date it **last** occurred, **not sorted by
|
|
157
|
+
date**: never read the last entry as the latest event. Types: `ACCOUNT_CONNECTED`,
|
|
158
|
+
`SITE_VERIFIED`, `SITE_ADDED`, `SITEMAP_SUBMITTED`, `SITE_INDEXING_REQUESTED`,
|
|
159
|
+
`PAGE_INDEXING_REQUESTED`. A missing type means that step never happened.
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
GET https://www.wixapis.com/gsc/v1/sitemaps
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{ "sitemaps": [ { "url": "https://www.example.com/blog-posts-sitemap.xml", "type": "sitemap", "pending": false,
|
|
167
|
+
"lastDownloadedDate": "2026-09-05T15:14:47.210Z", "errorCount": "0", "warningCount": "0",
|
|
168
|
+
"contents": [ { "type": "web", "submittedCount": "1", "indexedCount": "1" } ] } ] }
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Wix submits several sitemaps, typically one per content type. `pending: true` with
|
|
172
|
+
an empty `type` means Google has not processed it yet. Counts are strings.
|
|
173
|
+
|
|
174
|
+
## Read search performance
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
GET https://www.wixapis.com/gsc/v1/search-analytics?startDate=2026-08-01&endDate=2026-08-31&dimensions=query&rowLimit=5
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{ "results": [ { "keys": ["best of santorini"], "clicks": 0, "impressions": 3, "ctr": 0, "position": 36 } ] }
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- `startDate` and `endDate` are required, `YYYY-MM-DD`, end inclusive.
|
|
185
|
+
- `dimensions` repeats: `date`, `query`, `page`, `country`, `device`,
|
|
186
|
+
`searchAppearance`; omit for one aggregate row. `keys` follow your order.
|
|
187
|
+
- `type`: `web` (default), `image`, `video`, `news`. Page with `rowLimit`/`startRow`.
|
|
188
|
+
- It is Google's own report: the latest days are usually missing, and there is no
|
|
189
|
+
history from before the property was added. Empty `results` is a real answer.
|
|
190
|
+
|
|
191
|
+
## Inspect pages
|
|
192
|
+
|
|
193
|
+
Page IDs are Wix static-page IDs, not URLs. Discover them with
|
|
194
|
+
[List Item SEO Tags](https://dev.wix.com/docs/api-reference/business-management/seo/item-seo-tags-v1/list-item-seo-tags)
|
|
195
|
+
for `STATIC_PAGE`. The request has no body:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
GET https://www.wixapis.com/promote/seo/v1/item-seo-tags/STATIC_PAGE
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Relevant response fields (unrelated SEO fields omitted; IDs are illustrative):
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{ "itemSeoTags": [ { "id": "STATIC_PAGE:c1dmp", "itemType": "STATIC_PAGE", "itemId": "c1dmp" } ],
|
|
205
|
+
"pagingMetadata": { "count": 1, "hasNext": false, "cursors": {} } }
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
If `pagingMetadata.hasNext` is `true`, pass `pagingMetadata.cursors.next` back as
|
|
209
|
+
`paging.cursor` in the next request's query string, URL-encoded. Continue until
|
|
210
|
+
`hasNext` is `false`. The optional `paging.limit` controls the page size; omit the
|
|
211
|
+
cursor on the first request. Treat cursors as opaque.
|
|
212
|
+
|
|
213
|
+
Use each selected entry's `itemId` as a `pageIds` entry for Inspect URLs. Do not
|
|
214
|
+
use the composite `id` (`STATIC_PAGE:c1dmp`) or a page URL, and never invent an ID.
|
|
215
|
+
The example below assumes discovery returned `c1dmp` for the selected page.
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
POST https://www.wixapis.com/gsc/v1/inspect-urls
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{ "pageIds": ["c1dmp"], "updateResults": true }
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{ "results": [ { "page": { "pageId": "c1dmp", "name": "Home", "path": "/", "itemType": "STATIC_PAGE" },
|
|
227
|
+
"status": "OK", "createdDate": "2026-09-07T12:09:55.301Z",
|
|
228
|
+
"data": { "inspectionResultLink": "https://search.google.com/search-console/inspect?resource_id=https%3A%2F%2Fwww.example.com%2F&id=EXAMPLE_INSPECTION_ID",
|
|
229
|
+
"indexStatusResult": { "verdict": "PASS", "coverageState": "Submitted and indexed",
|
|
230
|
+
"indexingState": "INDEXING_ALLOWED", "lastCrawlTime": "2026-08-16T11:39:45Z",
|
|
231
|
+
"googleCanonical": "https://www.example.com/", "userCanonical": "https://www.example.com/" } } } ],
|
|
232
|
+
"status": "COMPLETE", "remainingPageCount": 0 }
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
- `data.inspectionResultLink` is returned by Google. The complete URL above is
|
|
236
|
+
illustrative; use the actual returned link unchanged, including its query
|
|
237
|
+
parameters. Do not construct a link from the example values.
|
|
238
|
+
- Each page spends one unit of the account's Google quota (2,000 per property per
|
|
239
|
+
day): confirm the page list first. Sites over 2,000 pages fail with
|
|
240
|
+
`SITE_EXCEEDS_INSPECTION_LIMIT`.
|
|
241
|
+
- The site stores **one** inspection; without `updateResults: true` a new call
|
|
242
|
+
replaces it. Prefer `true` unless the user wants a clean run.
|
|
243
|
+
- `ONGOING`: poll `GET https://www.wixapis.com/gsc/v1/inspection` every few
|
|
244
|
+
seconds until `COMPLETE` or `ERROR` (same shape plus `updatedDate`).
|
|
245
|
+
- `remainingPageCount > 0` on `COMPLETE` means quota ran out. Name the missing
|
|
246
|
+
pages; do not call it done.
|
|
247
|
+
- `data` is Google's raw URL Inspection payload: read `indexStatusResult.verdict`
|
|
248
|
+
(`PASS`, `PARTIAL`, `FAIL`, `NEUTRAL`) and `coverageState`; text is English only.
|
|
249
|
+
`UNKNOWN_INSPECTION_STATUS` with empty `results` means never inspected.
|
|
250
|
+
|
|
251
|
+
## Disconnect and clear
|
|
252
|
+
|
|
253
|
+
Two different removals; confirm which one the user wants.
|
|
254
|
+
|
|
255
|
+
| Call | Removes | Keeps |
|
|
256
|
+
|---|---|---|
|
|
257
|
+
| `POST /gsc/connection/v1/disconnect` | Stored Google credentials | Verification tag, Search Console property |
|
|
258
|
+
| `POST /gsc/v1/clear-verification` | Verification tag, verification state, **and** credentials | Search Console property |
|
|
259
|
+
|
|
260
|
+
Neither removes the site from Search Console or revokes Wix's access on Google's
|
|
261
|
+
side. Disconnect with no stored credentials returns `NOT_FOUND`
|
|
262
|
+
(`CONNECTION_NOT_FOUND`).
|
|
263
|
+
|
|
264
|
+
## When a call fails
|
|
265
|
+
|
|
266
|
+
- `403` or `PERMISSION_DENIED`: stop after the first and report the missing SEO
|
|
267
|
+
permission (reads need view access to SEO settings, writes need manage access).
|
|
268
|
+
Do not try another site, path, or method.
|
|
269
|
+
- `FAILED_PRECONDITION`: act on `details.applicationError.code` as above. Do not
|
|
270
|
+
retry the same call.
|
|
271
|
+
- Get Connect URL is a recovery step only for `MISSING_TOKEN`, `INVALID`, or
|
|
272
|
+
`TOKEN_INVALID`, and only after the user agrees to reconnect.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Upload a Website or HTML Files"
|
|
3
|
+
description: Publish a user's ready-made website — an index.html, a static build, or a zip exported from an AI builder or any other tool — as a new live Wix site. Covers both ways to get there — handing the user the Wix Headless drop page, and calling the Wix Headless instant-site REST API yourself when you can reach the files and make outbound HTTPS requests. When you also hold the user's identity, covers putting the published site straight into their Wix account and reading back its final live URL. Use whenever the user wants to upload, publish, deploy, or host their own HTML/CSS/JS as a NEW site, including files generated for them earlier in the conversation, or to update a site already published this way (iterate on the same site instead of creating another). Not for migrating a live store/site from another platform by URL or from CSV exports (use Site Import), not for adding HTML or custom code into an existing Wix site, and not for uploading images or documents to a site's media files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Upload a Website or HTML Files
|
|
7
|
+
|
|
8
|
+
The user has a finished website as files — hand-written HTML, a static build, a
|
|
9
|
+
zip, or the output of an AI site builder — and wants it live on Wix as a new
|
|
10
|
+
site. There are two ways to get there.
|
|
11
|
+
|
|
12
|
+
## The two paths
|
|
13
|
+
|
|
14
|
+
**[Path A — hand the user the drop page](#path-a--hand-the-user-the-drop-page).**
|
|
15
|
+
One URL; the user uploads in the browser and gets a live site. This works for
|
|
16
|
+
**any** agent and any user — it's the default. Reach for it whenever you can't
|
|
17
|
+
clearly do Path B.
|
|
18
|
+
|
|
19
|
+
**[Path B — publish the files yourself](#path-b--publish-the-files-yourself).**
|
|
20
|
+
Three calls put the site live without the user touching a browser. Available only
|
|
21
|
+
when **both** hold: you can read the file bytes (you generated them here, or
|
|
22
|
+
they're reachable from where you run), **and** you can do a `multipart/form-data`
|
|
23
|
+
file upload from a shell (`curl` or equivalent). Reaching APIs *only* through the
|
|
24
|
+
Wix API-call/execute-API tools does **not** count — they can't upload a local
|
|
25
|
+
file.
|
|
26
|
+
|
|
27
|
+
Prefer Path B when you can genuinely do it — the user gets a live site without
|
|
28
|
+
uploading anything themselves. Otherwise, and by default, take Path A. Decide
|
|
29
|
+
honestly: if you can't read the bytes or can't upload from a shell, hand over the
|
|
30
|
+
drop page rather than attempting Path B and reporting an upload you couldn't
|
|
31
|
+
perform.
|
|
32
|
+
|
|
33
|
+
## Path A — hand the user the drop page
|
|
34
|
+
|
|
35
|
+
Send the user here:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
https://www.wix.com/headless/drop?utm_campaign=mcp&agent=<your-agent-id>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Keep `utm_campaign=mcp`** (the drop-flow referral tag — don't change it) **and set
|
|
42
|
+
`agent` to your own identifier** — the coding agent or tool you are (e.g.
|
|
43
|
+
`claude-code`, `cursor`, `codex-cli`, `windsurf`, `github-copilot`, or your product's
|
|
44
|
+
name). Hand the URL with `agent` filled in and both params intact. There the user drags
|
|
45
|
+
in their files (no login), Wix hosts them immediately on a live URL, and a banner
|
|
46
|
+
offers to sign in and keep the site. Tell them the requirements from
|
|
47
|
+
[What the upload accepts](#what-the-upload-accepts-and-how-it-fails) so it doesn't
|
|
48
|
+
fail on the first try.
|
|
49
|
+
|
|
50
|
+
## Path B — publish the files yourself
|
|
51
|
+
|
|
52
|
+
> **Run every call from your shell with `curl` — not the Wix API-call/execute-API
|
|
53
|
+
> tools.** The upload (step 2) and the download in
|
|
54
|
+
> [Add a backend](#keep-building-add-a-backend-when-you-need-one) move a **file**
|
|
55
|
+
> to or from disk; those tools proxy JSON and can't (hand-building a multipart
|
|
56
|
+
> body inline silently drops every image and font). Create and release are plain
|
|
57
|
+
> JSON and would work through anything, but the upload needs a real file client
|
|
58
|
+
> anyway, so keep it all in the shell. **None of steps 1–3 (or the download) need
|
|
59
|
+
> auth — they're anonymous.** Only [claim](#4-put-the-site-in-the-users-account)
|
|
60
|
+
> needs the user's identity.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Base URL: https://www.wixapis.com/headless-business-setup
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Generate `anonymousId` yourself — any UUID, **once per site, not once per
|
|
67
|
+
request** — and reuse it (with the returned `metaSiteId`) for every call for that
|
|
68
|
+
site, including later changes ([Iterate](#iterate-while-anonymous-dont-create-a-new-site)).
|
|
69
|
+
**Finish within one hour of step 1**: after that the record expires and every
|
|
70
|
+
later step, claim included, returns `404`.
|
|
71
|
+
|
|
72
|
+
### 1. Create the site
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
curl -sS -X POST \
|
|
76
|
+
"https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{ "metaSiteId": "f0ad8672-09e9-4111-b6fe-070c70bd2df5",
|
|
81
|
+
"projectId": "54528d34-b23c-4fbe-b07d-2c522350abd7" }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Keep both: `metaSiteId` addresses the site in every later call; `projectId`
|
|
85
|
+
builds the save link in step 3b.
|
|
86
|
+
|
|
87
|
+
### 2. Upload the files
|
|
88
|
+
|
|
89
|
+
One `multipart/form-data` request carrying every file. Each file is a part named
|
|
90
|
+
`files` whose **filename is its path relative to the site root** — that is how
|
|
91
|
+
subdirectories survive; with `curl`, set it explicitly with `;filename=` whenever
|
|
92
|
+
it isn't just the basename. A single `.zip` part works too — send it alone and
|
|
93
|
+
it's unpacked server-side, a single wrapping folder stripped.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
AGENT=claude-code # ← replace with your own identifier (see note below)
|
|
97
|
+
curl -sS -X POST \
|
|
98
|
+
"https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/upload?campaign=mcp&agent=$AGENT" \
|
|
99
|
+
-F "files=@index.html;filename=index.html" \
|
|
100
|
+
-F "files=@assets/styles.css;filename=assets/styles.css" \
|
|
101
|
+
-F "files=@assets/logo.png;filename=assets/logo.png"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{ "uploadId": "03244542-d820-42f6-acfa-166c6658b1a6" }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Keep `campaign=mcp` (the drop-flow referral tag — don't change it) and set
|
|
109
|
+
`agent=$AGENT` to **your own identifier**: the coding agent or tool performing this
|
|
110
|
+
drop, so the upload is attributed to the real client. Use a short, stable,
|
|
111
|
+
lowercase-hyphenated slug — e.g. `claude-code`, `cursor`, `codex-cli`, `windsurf`,
|
|
112
|
+
`github-copilot`, or your product's name; if you genuinely can't name yourself, use
|
|
113
|
+
`unknown-agent`. Send the **same** `agent` on every upload for this site, matching
|
|
114
|
+
the `agent` you'd use in Path A. Nothing is live yet; this only stages and validates.
|
|
115
|
+
|
|
116
|
+
### 3. Release — the site goes live
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
curl -sS -X POST \
|
|
120
|
+
"https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/release" \
|
|
121
|
+
-H 'Content-Type: application/json' \
|
|
122
|
+
-d "{\"uploadId\":\"$UPLOAD_ID\"}"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{ "siteUrl": "https://instant-hguwrvtcrniw-headlessstack-140d.wix-site-host.com" }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The site is live at `siteUrl` immediately.
|
|
130
|
+
|
|
131
|
+
#### Iterate while anonymous (don't create a new site)
|
|
132
|
+
|
|
133
|
+
Simple static changes — new copy, another page, a different look — happen here,
|
|
134
|
+
**while the site is still anonymous**, and this is the only window for them:
|
|
135
|
+
re-run steps 2–3 with the **same `anonymousId` and `metaSiteId`**; the upload
|
|
136
|
+
replaces the site's contents and `siteUrl` stays the same. Send the full file set
|
|
137
|
+
each time (release replaces, it doesn't merge). Don't go back to step 1 — a fresh
|
|
138
|
+
site per change leaves the user a trail of abandoned sites on changing URLs; only
|
|
139
|
+
create another for a genuinely separate site.
|
|
140
|
+
|
|
141
|
+
So **iterate first, claim last**: refine on the same ids until the site is right,
|
|
142
|
+
*then* finish. Once claimed, these anonymous endpoints stop working and the only
|
|
143
|
+
way to keep changing the site in code is a headless project
|
|
144
|
+
([Keep building](#keep-building-add-a-backend-when-you-need-one)).
|
|
145
|
+
|
|
146
|
+
**When the site is final, finish based on identity:**
|
|
147
|
+
|
|
148
|
+
- **You have the user's access token** — claim it into their account (step 4).
|
|
149
|
+
Don't stop at a temporary site: an unclaimed site expires, so saving it is part
|
|
150
|
+
of publishing, not an extra favour to ask about.
|
|
151
|
+
- **You have no user identity** — stop here; this is a finished, legitimate result
|
|
152
|
+
(exactly what the drop page produces for every visitor). Give the user `siteUrl`
|
|
153
|
+
plus the save link, which is how the site survives:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
https://www.wix.com/live-headless-site/{projectId}?anonymousId={anonymousId}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
That page shows the site with a countdown and signs the user in to keep it.
|
|
160
|
+
Treat the link as a secret — whoever opens it while signed in to Wix claims the
|
|
161
|
+
site into *their* account — so give it only to the user who asked.
|
|
162
|
+
|
|
163
|
+
### 4. Put the site in the user's account
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
curl -sS -X POST \
|
|
167
|
+
"https://www.wixapis.com/headless-business-setup/v1/headless-business/anonymous/$ANONYMOUS_ID/$META_SITE_ID/claim" \
|
|
168
|
+
-H "Authorization: Bearer $ACCESS_TOKEN"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Returns `{}` on success; needs a user or account-level identity (else
|
|
172
|
+
`UNAUTHENTICATED`). It consumes the anonymous record, so it's the last call that
|
|
173
|
+
works against these endpoints — do it after the release, never before.
|
|
174
|
+
|
|
175
|
+
**The site's URL changes here.** The step-3 host stops resolving — the free host
|
|
176
|
+
is scoped to the owning account and re-minted under the user's. Read the new one
|
|
177
|
+
in step 5; never repeat the step-3 URL after a claim.
|
|
178
|
+
|
|
179
|
+
### 5. Read the site's final URL
|
|
180
|
+
|
|
181
|
+
[Query Sites](https://dev.wix.com/docs/api-reference/account-level/sites/sites/query-sites)
|
|
182
|
+
filtered to the **`HEADLESS` namespace** — headless sites are omitted from the
|
|
183
|
+
default query, so the filter is required, and an `id` filter is rejected, so match
|
|
184
|
+
the id yourself.
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
curl -sS -X POST "https://www.wixapis.com/site-list/v2/sites/query" \
|
|
188
|
+
-H "Authorization: Bearer $ACCESS_TOKEN" \
|
|
189
|
+
-H 'Content-Type: application/json' \
|
|
190
|
+
-d '{"query":{"filter":{"namespace":"HEADLESS"},"cursorPaging":{"limit":100}}}'
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Find the entry whose `id` equals your `metaSiteId`, read `viewUrl` (page with
|
|
194
|
+
`metadata.cursors.next` if needed):
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{ "id": "f0ad8672-09e9-4111-b6fe-070c70bd2df5",
|
|
198
|
+
"displayName": "Snake", "published": true, "namespace": "HEADLESS",
|
|
199
|
+
"viewUrl": "https://instant-hguwrvtcrniw-ayalg5-1406.wix-site-host.com/" }
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Give the user two links: `viewUrl` for the live site, and its dashboard at
|
|
203
|
+
`https://manage.wix.com/dashboard/{metaSiteId}` to manage it.
|
|
204
|
+
|
|
205
|
+
### What the upload accepts, and how it fails
|
|
206
|
+
|
|
207
|
+
The requirements below apply to both paths — an upload that breaks them is why a
|
|
208
|
+
release never happens:
|
|
209
|
+
|
|
210
|
+
- **A top-level HTML file is required.** It needn't be named `index.html` (a lone
|
|
211
|
+
top-level HTML of any name becomes the homepage), but once there's more than
|
|
212
|
+
one, an `index.html` must be among them.
|
|
213
|
+
- **3 MB per file, 20 MB per site.**
|
|
214
|
+
- **Static files only** — HTML, CSS, JS, images, fonts. Framework source that
|
|
215
|
+
needs a build step (a `package.json`, React/Vue sources) must be built first;
|
|
216
|
+
upload the build output.
|
|
217
|
+
|
|
218
|
+
On Path B, failures come back as HTTP 400 with a code in
|
|
219
|
+
`details.applicationError.code`: `MISSING_INDEX_HTML` (add a top-level HTML),
|
|
220
|
+
`FILE_TOO_LARGE` (a file over 3 MB), `TOTAL_TOO_LARGE` (bundle over 20 MB). A
|
|
221
|
+
`404` after step 1 means the one-hour window passed or the site was already
|
|
222
|
+
claimed — start again from step 1.
|
|
223
|
+
|
|
224
|
+
**If Path B fails for any reason you can't quickly fix — a rejected upload, an
|
|
225
|
+
error, a call you can't make — fall back to [Path A](#path-a--hand-the-user-the-drop-page):
|
|
226
|
+
give the user the drop-page link so they can finish in the browser.** Never leave
|
|
227
|
+
them with a failed publish and no way forward; the drop page reaches the same
|
|
228
|
+
result without the step that broke.
|
|
229
|
+
|
|
230
|
+
## Keep building: add a backend when you need one
|
|
231
|
+
|
|
232
|
+
The drop flow publishes **static** files. When the site needs a real backend —
|
|
233
|
+
stores, payments, bookings, a CMS, members, forms — it becomes a **Wix Headless
|
|
234
|
+
project**. This is a solution the user chooses when the need appears, not a
|
|
235
|
+
required step: a static site is a finished result on its own.
|
|
236
|
+
|
|
237
|
+
Offer it once the site is claimed/owned and you're in a coding environment with a
|
|
238
|
+
shell. It keeps the **same site, appId and URL** (the downloaded project already
|
|
239
|
+
carries a `wix.config.json` binding it), and is released with the Wix CLI from
|
|
240
|
+
then on:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
curl -sSL -o project.zip \
|
|
244
|
+
"https://www.wix.com/_api/wixstro-deployments/v1/instant-sites/$META_SITE_ID/download.zip"
|
|
245
|
+
unzip project.zip -d project # index.html + assets + wix.config.json
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Then follow `https://wix.com/headless/skill.md`: it turns the static files into a
|
|
249
|
+
headless project (`@wix/sdk` + the business solutions the site needs), bound to
|
|
250
|
+
the same site.
|
|
251
|
+
|
|
252
|
+
This is the only way to keep changing a **claimed** site in code, and it's why it
|
|
253
|
+
needs `wix login`: re-releasing to a claimed site is authenticated *and*
|
|
254
|
+
file-based, and an authenticated file operation needs the token in your **shell**
|
|
255
|
+
(via `wix login`), not injected into a tool — the API-call/execute-API tools carry
|
|
256
|
+
the auth but can't do file operations. There's no lighter "re-upload static to my
|
|
257
|
+
claimed site" shortcut.
|
|
258
|
+
|
|
259
|
+
## Route the request correctly
|
|
260
|
+
|
|
261
|
+
- **You can't read the files, can't make HTTP calls, or have no shell
|
|
262
|
+
(API-call/execute-API tools only, which can't upload a file)** — Path A, the
|
|
263
|
+
drop page. It's also the default whenever Path B isn't clearly available, and
|
|
264
|
+
the fallback whenever Path B fails partway — hand over the link, don't leave the
|
|
265
|
+
user stuck.
|
|
266
|
+
- **Files you generated here or can read, and you can upload from a shell** —
|
|
267
|
+
Path B. If you hold the user's identity, claim it into their account and return
|
|
268
|
+
the live URL + dashboard.
|
|
269
|
+
- **A change to a site you published this way here** —
|
|
270
|
+
[iterate in place](#iterate-while-anonymous-dont-create-a-new-site) on the same ids.
|
|
271
|
+
- **A published anonymous site the user wants to keep** — steps 4–5 with their
|
|
272
|
+
identity, else the step-3 save link.
|
|
273
|
+
- **A claimed site that now needs a backend** (stores, bookings, CMS, members,
|
|
274
|
+
forms) — [add a backend](#keep-building-add-a-backend-when-you-need-one).
|
|
275
|
+
- **Migrating a live site/store from another platform by URL, or CSV/TSV
|
|
276
|
+
exports** — [Site Import](site-import.md).
|
|
277
|
+
- **Adding HTML, an embed, or code to an existing Wix site** — not this recipe
|
|
278
|
+
(that's custom code in the editor).
|
|
279
|
+
- **Images, videos, or documents for a site** —
|
|
280
|
+
[Upload Media to Wix](../media/upload-media-to-wix.md).
|
|
281
|
+
|
|
282
|
+
Don't create the site with other tools (meta-site templates, headless-business
|
|
283
|
+
provisioning) — those make an empty site, not a published copy of the user's files.
|
|
@@ -5,6 +5,6 @@ description: "Changes the store's payment currency through Site Properties and e
|
|
|
5
5
|
|
|
6
6
|
# Change Store Currency
|
|
7
7
|
|
|
8
|
-
Use the [Site Properties
|
|
8
|
+
Use the [Change a Site's Regional Properties (Currency, Time Zone, Language) via Site Properties API](../site-properties/change-payment-currency-site-properties.md) recipe to set the requested payment currency and read it back. Confirm the change with the user before updating it.
|
|
9
9
|
|
|
10
10
|
Catalog product responses may temporarily show the previous currency after carts and checkout use the new one. Allow time for propagation, then recheck.
|
|
@@ -100,7 +100,9 @@ product **without** `imageUrl` and attach it afterwards with `attachProductImage
|
|
|
100
100
|
|
|
101
101
|
## STEP 4 — Wrap up
|
|
102
102
|
|
|
103
|
-
###
|
|
103
|
+
### Verify
|
|
104
|
+
|
|
105
|
+
Verify **once, after the seed** — home, shop, and a product page against the populated catalog.
|
|
104
106
|
|
|
105
107
|
Images that are still generating may show `/__generating__/…` placeholders;
|
|
106
108
|
the platform replaces these automatically at turn end, with a stock fallback if generation
|
|
@@ -85,7 +85,9 @@ product **without** `imageUrl` and attach it afterwards with `attachProductImage
|
|
|
85
85
|
|
|
86
86
|
## STEP 3 — Wrap up
|
|
87
87
|
|
|
88
|
-
###
|
|
88
|
+
### Verify
|
|
89
|
+
|
|
90
|
+
Verify **once, after the seed** — home, shop, and a product page against the populated catalog.
|
|
89
91
|
|
|
90
92
|
Images that are still generating may show `/__generating__/…` placeholders;
|
|
91
93
|
the platform replaces these automatically at turn end, with a stock fallback if generation
|
|
@@ -62,7 +62,7 @@ need to diagnose and fix it.
|
|
|
62
62
|
|
|
63
63
|
**No seeding in this flow** — the client is the only deliverable. Do not seed, populate, or write data to Wix.
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### Verify
|
|
66
66
|
|
|
67
67
|
Images that are still generating may show `/__generating__/…` placeholders;
|
|
68
68
|
the platform replaces these automatically at turn end, with a stock fallback if generation
|