@wix/agent-skills 1.31.1 → 1.32.0

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.
Files changed (121) hide show
  1. package/README.md +4 -12
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +39 -15
  4. package/skills/wix-app/references/BACKEND_API.md +1 -1
  5. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +11 -8
  6. package/skills/wix-app/references/SDK_MODULE_MAP.md +1 -1
  7. package/skills/wix-app/references/STORES_VERSIONING.md +24 -2
  8. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +9 -13
  9. package/skills/wix-app/references/dashboard-page/IMAGE_RENDERING.md +61 -0
  10. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +54 -64
  11. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +14 -21
  12. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +37 -30
  13. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +43 -29
  14. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +40 -39
  15. package/skills/wix-app/references/editor-react-component/PARTS.md +8 -6
  16. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +22 -2
  17. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +39 -16
  18. package/skills/wix-app/scripts/sdk-curated.json +45 -0
  19. package/skills/wix-app/scripts/sdk-lookup.cjs +1180 -0
  20. package/skills/wix-base44-connector/SKILL.md +4 -2
  21. package/skills/wix-base44-connector/scripts/utils.cjs +5 -2
  22. package/skills/wix-headless-kit/SKILL.md +20 -8
  23. package/skills/wix-headless-kit/guides/api-run.md +92 -68
  24. package/skills/wix-headless-kit/guides/existing-site.md +6 -0
  25. package/skills/wix-headless-kit/install/AGENTS.md +3 -2
  26. package/skills/wix-headless-kit/install/attach.mjs +32 -27
  27. package/skills/wix-headless-kit/install/background.mjs +32 -0
  28. package/skills/wix-headless-kit/install/bootstrap.mjs +28 -11
  29. package/skills/wix-headless-kit/install/check.mjs +2 -2
  30. package/skills/wix-headless-kit/install/context.mjs +49 -5
  31. package/skills/wix-headless-kit/install/deploy.mjs +33 -8
  32. package/skills/wix-headless-kit/install/env-ignore.mjs +16 -0
  33. package/skills/wix-headless-kit/install/install.mjs +95 -0
  34. package/skills/wix-headless-kit/install/pins.json +1 -1
  35. package/skills/wix-headless-kit/install/proc.mjs +46 -0
  36. package/skills/wix-headless-kit/install/setup.mjs +16 -25
  37. package/skills/wix-headless-kit/install/templates.mjs +2 -2
  38. package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +3 -2
  39. package/skills/wix-headless-templates/blog/project/package-lock.json +1287 -1299
  40. package/skills/wix-headless-templates/blog/project/package.json +1 -1
  41. package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +3 -2
  42. package/skills/wix-headless-templates/blog/rest/authors.ts +5 -5
  43. package/skills/wix-headless-templates/blog/rest/comments.ts +4 -4
  44. package/skills/wix-headless-templates/blog/rest/post-likes.ts +3 -3
  45. package/skills/wix-headless-templates/blog/rest/posts.ts +4 -4
  46. package/skills/wix-headless-templates/blog/rest/taxonomy.ts +5 -5
  47. package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +2 -1
  48. package/skills/wix-headless-templates/bookings/rest/booking.ts +4 -4
  49. package/skills/wix-headless-templates/bookings/rest/services.ts +4 -4
  50. package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +2 -1
  51. package/skills/wix-headless-templates/cms/rest/collections.ts +3 -3
  52. package/skills/wix-headless-templates/cms/rest/items.ts +4 -4
  53. package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +2 -1
  54. package/skills/wix-headless-templates/donations/rest/campaigns.ts +4 -4
  55. package/skills/wix-headless-templates/donations/rest/donate.ts +3 -3
  56. package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +2 -1
  57. package/skills/wix-headless-templates/events/rest/events.ts +4 -4
  58. package/skills/wix-headless-templates/events/rest/orders.ts +4 -4
  59. package/skills/wix-headless-templates/events/rest/registration.ts +4 -4
  60. package/skills/wix-headless-templates/events/seed/seed-events.mjs +2 -1
  61. package/skills/wix-headless-templates/faq/rest/faq.ts +4 -4
  62. package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +2 -1
  63. package/skills/wix-headless-templates/forms/rest/forms.ts +4 -4
  64. package/skills/wix-headless-templates/forms/rest/submissions.ts +4 -4
  65. package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +2 -1
  66. package/skills/wix-headless-templates/members/rest/auth.ts +3 -3
  67. package/skills/wix-headless-templates/members/rest/members.ts +4 -4
  68. package/skills/wix-headless-templates/members/seed/seed-members.mjs +2 -1
  69. package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +4 -4
  70. package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +2 -1
  71. package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +3 -3
  72. package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +4 -4
  73. package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +3 -3
  74. package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +2 -1
  75. package/skills/wix-headless-templates/rentals/rest/rentals.ts +4 -4
  76. package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +2 -1
  77. package/skills/wix-headless-templates/restaurants/rest/menu.ts +4 -4
  78. package/skills/wix-headless-templates/restaurants/rest/ordering.ts +5 -5
  79. package/skills/wix-headless-templates/restaurants/rest/reservations.ts +4 -4
  80. package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +2 -1
  81. package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +4 -4
  82. package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +6 -4
  83. package/skills/wix-headless-templates/shared/seed/main.mjs +15 -0
  84. package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +43 -11
  85. package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +1 -1
  86. package/skills/wix-headless-templates/storefront/rest/cart.ts +5 -5
  87. package/skills/wix-headless-templates/storefront/rest/catalog.ts +5 -5
  88. package/skills/wix-headless-templates/storefront/seed/SEED.md +27 -9
  89. package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +2 -1
  90. package/skills/wix-manage/SKILL.md +31 -9
  91. package/skills/wix-manage/references/app-installation/install-wix-apps.md +5 -1
  92. package/skills/wix-manage/references/app-installation/list-installed-apps.md +19 -9
  93. package/skills/wix-manage/references/automations/actions.md +134 -0
  94. package/skills/wix-manage/references/automations/activation-status.md +64 -48
  95. package/skills/wix-manage/references/automations/api-catalog.md +213 -77
  96. package/skills/wix-manage/references/automations/automation-model.md +199 -0
  97. package/skills/wix-manage/references/automations/bracket-expressions.md +132 -0
  98. package/skills/wix-manage/references/automations/build-and-manage-automations.md +305 -26
  99. package/skills/wix-manage/references/automations/triggers.md +190 -0
  100. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -0
  101. package/skills/wix-manage/references/bookings/external-calendar-integration.md +3 -0
  102. package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +3 -0
  103. package/skills/wix-manage/references/cms/cms-data-items-crud.md +11 -2
  104. package/skills/wix-manage/references/cms/cms-publishing-flow.md +63 -16
  105. package/skills/wix-manage/references/collaborators/manage-site-collaborators.md +128 -0
  106. package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +3 -1
  107. package/skills/wix-manage/references/forms/read-forms-and-submissions.md +277 -0
  108. package/skills/wix-manage/references/forms/update-form.md +8 -0
  109. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +3 -0
  110. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +3 -0
  111. package/skills/wix-manage/references/seo/manage-url-redirects.md +33 -4
  112. package/skills/wix-manage/references/sites/create-headless-site.md +16 -50
  113. package/skills/wix-manage/references/sites/manage-oauth-apps.md +4 -4
  114. package/skills/wix-manage/references/sites/read-site-context.md +4 -0
  115. package/skills/wix-manage/references/sites/upload-static-site.md +368 -261
  116. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +3 -0
  117. package/skills/wix-manage/references/stores/change-store-currency.md +3 -0
  118. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +3 -0
  119. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +3 -0
  120. package/skills/wix-manage/references/stores/update-product-with-options.md +192 -22
  121. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +3 -3
@@ -0,0 +1,277 @@
1
+ ---
2
+ name: "Read Forms and Submissions"
3
+ description: "Reads a site's Wix forms and the submissions visitors sent to them — what forms do I have, find a form by name, show the latest submissions, who filled in my contact form, how many submissions did I get last week, submissions from one contact, unread submissions. Covers finding the form's namespace instead of guessing it, where that namespace goes on each read, the Form Schemas and Form Submissions endpoints (and the look-alike URLs that 404), forms hidden from a default listing, the closed list of submission fields you can filter and sort by, date ranges, cursor paging, totals per form, and reading answers by field. Read-only; changing a form is Update Form, building one is Create Form."
4
+ ---
5
+ # RECIPE: Read Wix Forms and Their Submissions
6
+
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`. Send `wix-site-id: <SITE_ID>` when the token is account-scoped.
8
+
9
+ > These calls need the Wix Forms app on the site (`appDefId` `225dd912-7dea-4738-8688-4b8c6955ffc2`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
10
+
11
+ List a site's forms, find one, and read the submissions sent to it. The usual order is **find the form first, then query its submissions by `formId`**. Every call here is a read — nothing on the site changes, so no confirmation is needed.
12
+
13
+ ---
14
+
15
+ ## STEP 1 · Know the namespace — never guess it
16
+
17
+ Every form and every submission belongs to one **namespace**: the app that owns the form. Every read except Get Form and Get Submission needs it.
18
+
19
+ | App that owns the form | Namespace |
20
+ |---|---|
21
+ | Wix Forms (the forms on the site's **Forms** dashboard) | `wix.form_app.form` |
22
+ | Wix Bookings | `wix.bookings.v2.bookings` |
23
+ | Wix Pricing Plans | `wix.pricing_plans.v1.custom_form` |
24
+ | Wix eCom checkout | `wix.ecom.v1.checkout` |
25
+ | Wix Quizzes | `wix.achievements.quizzes.v1.quiz` |
26
+ | Wix Contacts | `wix.contacts.v4.contact` |
27
+
28
+ The source is [Namespaces of apps made by Wix](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction#namespaces-of-apps-made-by-wix).
29
+
30
+ - **"My forms", "my contact form", "form submissions"** with no app named → `wix.form_app.form`.
31
+ - **You already hold a form** → use its `namespace` field.
32
+ - **`Permissions for given namespace not found: <namespace>`** → that app is not installed on the site. **Stop.** Check the site's apps with [List Installed Apps](../app-installation/list-installed-apps.md) and tell the user the app is missing. Do not try other namespaces (`wix.old_form_app.form`, `wix.forms`, …): none of them exist, and each one only costs another failed call.
33
+ - **List Forms returns `"forms": []`** for a namespace → it means *no forms there*, or *the wrong namespace*. It does not error on a namespace the site lacks.
34
+
35
+ ---
36
+
37
+ ## STEP 2 · Pick the call
38
+
39
+ | Task | Request | Where the namespace goes |
40
+ |---|---|---|
41
+ | List forms | `GET https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form` | query parameter `namespace` (required) |
42
+ | Query forms (by name, date) | `POST https://www.wixapis.com/form-schema-service/v4/forms/query` | inside the filter: `"namespace": {"$eq": "wix.form_app.form"}` |
43
+ | Get one form | `GET https://www.wixapis.com/form-schema-service/v4/forms/{formId}` | not needed |
44
+ | Query submissions | `POST https://www.wixapis.com/form-submission-service/v4/submissions/namespace/query` | inside the filter: `"namespace": "wix.form_app.form"` |
45
+ | Get one submission | `GET https://www.wixapis.com/form-submission-service/v4/submissions/{submissionId}` | not needed |
46
+ | Count submissions per form | `POST https://www.wixapis.com/form-submission-service/v4/submissions/count` | body field `namespace` |
47
+
48
+ **⚠️ These look-alike URLs do not exist and return a bare `404`:**
49
+
50
+ - `/forms/v4/forms`, `/forms/v4/forms/query`, `/forms/v4/forms/{formId}` — forms live under **`/form-schema-service/v4/`**.
51
+ - `/form-schema-service/v4/submissions/...` and `/form-submission-service/v4/forms` — submissions live under **`/form-submission-service/v4/submissions/`**, forms don't.
52
+
53
+ **Use `.../submissions/namespace/query` for every submissions query.** It is the only submissions query the docs list. Don't drop `namespace` from the path.
54
+
55
+ `https://www.wixapis.com/forms/v4/submissions/...` (the `publicUrl` the API spec gives for the submission methods) is the same API under another path, and works too. The `/forms/v4/` alias exists for submissions only: `/forms/v4/forms` still 404s.
56
+
57
+ ---
58
+
59
+ ## STEP 3 · List or find the forms
60
+
61
+ ### List every form
62
+
63
+ ```bash
64
+ # enabled forms (the default)
65
+ curl -X GET \
66
+ 'https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form&fieldsets=METADATA&paging.limit=100' \
67
+ -H 'Authorization: <AUTH>'
68
+
69
+ # disabled forms — a second call, always
70
+ curl -X GET \
71
+ 'https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form&enabled=false&fieldsets=METADATA&paging.limit=100' \
72
+ -H 'Authorization: <AUTH>'
73
+ ```
74
+
75
+ - **⚠️ `enabled` defaults to `true`, and no value returns both.** One call hides every disabled form. With List Forms, make both calls and report both lists, marking the disabled ones. Or use Query Forms with only the namespace filter (below): it returns enabled and disabled forms in one call.
76
+ - **`fieldsets=METADATA`** returns only the top-level properties (`id`, `name`, `enabled`, dates, `namespace`) and leaves out fields, steps and rules. Use it whenever you only need names and IDs. Omit it when you need the fields (to read submission answers, see STEP 5).
77
+ - Response: `forms[]` and **`pagingMetadata`**. When `pagingMetadata.hasNext` is `true`, call again with `paging.cursor=<pagingMetadata.cursors.next>`.
78
+ - To read specific forms, add `formIds=<id>` (repeat the parameter for each ID).
79
+
80
+ ### Find a form by name or date
81
+
82
+ ```bash
83
+ curl -X POST \
84
+ 'https://www.wixapis.com/form-schema-service/v4/forms/query' \
85
+ -H 'Content-Type: application/json' \
86
+ -H 'Authorization: <AUTH>' \
87
+ -d '{
88
+ "query": {
89
+ "filter": {
90
+ "namespace": { "$eq": "wix.form_app.form" },
91
+ "name": { "$startsWith": "Contact" }
92
+ },
93
+ "sort": [{ "fieldName": "createdDate", "order": "DESC" }],
94
+ "cursorPaging": { "limit": 50 }
95
+ }
96
+ }'
97
+ ```
98
+
99
+ - Filter and sort fields: `id`, `namespace` (`$eq` only), `name` (`$eq`, `$ne`, `$in`, `$nin`, `$startsWith`), `enabled` (`$eq`, `$ne`), `createdDate` and `updatedDate` (`$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`). Date operators are `$gte` / `$lte`. **`$ge` / `$le` are rejected.** A range needs one condition per operator under `$and`, exactly as for submissions in STEP 4.
100
+ - Query Forms returns enabled and disabled forms together, unless you filter on `enabled`.
101
+ - Response: `forms[]` and **`metadata`** (not `pagingMetadata`). For the next page, see [Paging](#paging).
102
+
103
+ ### Read one form
104
+
105
+ ```bash
106
+ curl -X GET \
107
+ 'https://www.wixapis.com/form-schema-service/v4/forms/{formId}' \
108
+ -H 'Authorization: <AUTH>'
109
+ ```
110
+
111
+ Returns `form`, with `formFields` (each input field's `inputOptions.target` is the key its answers are stored under) and `namespace`.
112
+
113
+ ---
114
+
115
+ ## STEP 4 · Query the submissions
116
+
117
+ ### The latest submissions to one form
118
+
119
+ ```bash
120
+ curl -X POST \
121
+ 'https://www.wixapis.com/form-submission-service/v4/submissions/namespace/query' \
122
+ -H 'Content-Type: application/json' \
123
+ -H 'Authorization: <AUTH>' \
124
+ -d '{
125
+ "query": {
126
+ "filter": {
127
+ "namespace": "wix.form_app.form",
128
+ "formId": "<formId>"
129
+ },
130
+ "sort": [{ "fieldName": "createdDate", "order": "DESC" }],
131
+ "cursorPaging": { "limit": 20 }
132
+ }
133
+ }'
134
+ ```
135
+
136
+ - **⚠️ `namespace` goes inside `query.filter`.** A top-level `"namespace"` beside `query` doesn't count: the call fails with `namespace filter is required`.
137
+ - Leave out `formId` to read submissions across every form in the namespace.
138
+ - Response: `submissions[]` and **`metadata`** (`count`, `hasNext`, `cursors.next`). Each submission has `id`, `formId`, `status`, `seen`, `contactId` (when linked to a contact), `submitter`, `createdDate`, and `submissions` (the answers, see STEP 5).
139
+
140
+ ### Read one submission
141
+
142
+ When you already hold a submission ID, read it directly. No namespace is needed:
143
+
144
+ ```bash
145
+ curl -X GET \
146
+ 'https://www.wixapis.com/form-submission-service/v4/submissions/{submissionId}' \
147
+ -H 'Authorization: <AUTH>'
148
+ ```
149
+
150
+ Returns `submission`, with the same fields as a query result, including `formId` (the form it belongs to) and the answers in `submissions`.
151
+
152
+ ### When it was submitted = `createdDate`
153
+
154
+ **The submission time is `createdDate`.** Filter and sort on it. These fields **do not exist**, and each one fails with `Filter contains unsupported condition` or `Sort contains unsupported condition`: `submittedDate`, `submittedAt`, `submissionTime`, `submissionDate`, `dateCreated`, `_createdDate`.
155
+
156
+ ### A date range — one condition per operator, joined with `$and`
157
+
158
+ A field takes **one** operator. Two operators in one object, such as `"createdDate": {"$gte": …, "$lt": …}`, fail with `Field '$lt' is not supported for filter with operator '$eq'`. Put each bound in its own condition under `$and`:
159
+
160
+ ```bash
161
+ curl -X POST \
162
+ 'https://www.wixapis.com/form-submission-service/v4/submissions/namespace/query' \
163
+ -H 'Content-Type: application/json' \
164
+ -H 'Authorization: <AUTH>' \
165
+ -d '{
166
+ "query": {
167
+ "filter": {
168
+ "$and": [
169
+ { "namespace": "wix.form_app.form" },
170
+ { "createdDate": { "$gte": "2026-10-05T00:00:00Z" } },
171
+ { "createdDate": { "$lt": "2026-10-12T00:00:00Z" } }
172
+ ]
173
+ },
174
+ "sort": [{ "fieldName": "createdDate", "order": "DESC" }],
175
+ "cursorPaging": { "limit": 100 }
176
+ }
177
+ }'
178
+ ```
179
+
180
+ - Write dates as ISO 8601 UTC. For "last week", work out the week's start and end from today's date, and say which dates you used.
181
+ - **"How many…" in a date range**: follow every page and add up `metadata.count`. There is no total in the response, and Count Submissions takes no date filter.
182
+ - **"How many…" in total, per form**: Count Submissions.
183
+
184
+ ```bash
185
+ curl -X POST \
186
+ 'https://www.wixapis.com/form-submission-service/v4/submissions/count' \
187
+ -H 'Content-Type: application/json' \
188
+ -H 'Authorization: <AUTH>' \
189
+ -d '{ "formIds": ["<formId>"], "namespace": "wix.form_app.form" }'
190
+ ```
191
+
192
+ Returns `formsSubmissionsCount[]`, with `formId`, `totalCount` and `unseenCount` for each form.
193
+
194
+ ### The fields you can filter and sort by — a closed list
195
+
196
+ | Field | Filter operators | Sortable |
197
+ |---|---|---|
198
+ | `namespace` | `$eq` — **required in every filter** | no |
199
+ | `id`, `formId`, `contactId`, `status` | `$eq`, `$ne`, `$in`, `$nin` | yes |
200
+ | `seen` | `$eq`, `$ne` | yes |
201
+ | `createdDate`, `updatedDate` | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin` | yes |
202
+ | `submitter.memberId`, `submitter.visitorId`, `submitter.applicationId`, `submitter.userId` | `$eq`, `$ne`, `$in`, `$nin` | yes |
203
+ | `orderDetails.checkoutId` | `$eq`, `$ne`, `$in`, `$nin` | yes |
204
+
205
+ Any other field is rejected. The common wrong ones:
206
+
207
+ | You want | Use | Not |
208
+ |---|---|---|
209
+ | Submissions from one contact | `"contactId": "<contactId>"` (top level) | `submitter.contactId`, `submitterContactId` |
210
+ | Submissions to one form | `"formId": "<formId>"` | `submission.formId` |
211
+ | Unread submissions | `"seen": false` | — |
212
+ | Recorded submissions only | `"status": "CONFIRMED"` | — |
213
+ | Submissions with a given answer (an email typed in, a choice picked) | Not filterable. Filter by `formId`, then match the answer in code (STEP 5). | `submissions.email`, `submissions.<target>`, `contact.email` |
214
+
215
+ To find a person's submissions by their email, look up the contact first, then filter submissions by `"contactId": "<contacts[0].id>"`:
216
+
217
+ ```bash
218
+ curl -X POST \
219
+ 'https://www.wixapis.com/contacts/v4/contacts/query' \
220
+ -H 'Content-Type: application/json' \
221
+ -H 'Authorization: <AUTH>' \
222
+ -d '{ "query": { "filter": { "info.emails.email": "jane@example.com" }, "fieldsets": ["BASIC"] } }'
223
+ ```
224
+
225
+ No contact found means no submissions linked to that email. See [Query Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/query-contacts).
226
+
227
+ ### Paging
228
+
229
+ Each page holds at most **100** submissions or forms. When `metadata.hasNext` is `true`, send the same URL with **only** the cursor. The cursor carries the filter and sort, including the namespace:
230
+
231
+ ```json
232
+ { "query": { "cursorPaging": { "limit": 100, "cursor": "<metadata.cursors.next>" } } }
233
+ ```
234
+
235
+ ---
236
+
237
+ ## STEP 5 · Read the answers
238
+
239
+ A submission's answers are in its `submissions` object, keyed by each field's **`target`**:
240
+
241
+ ```json
242
+ "submissions": { "email_1923": "jane@example.com", "short_answer_7b5c": "Hello" }
243
+ ```
244
+
245
+ The targets are not labels. To show the user readable answers, read the form once (Get Form) and match each `formFields[].inputOptions.target` to the label inside that field's `inputOptions`, for example `stringOptions.textInputOptions.label`.
246
+
247
+ **Return only what the user asked for.** A submission page can be large. Before you answer or pass results on, keep only the fields you need, such as `id`, `createdDate`, `contactId` and the few answers that matter. Use `fieldsets=METADATA` on List Forms for the same reason.
248
+
249
+ To give the user a link to a form's submissions table, see [Forms Dashboard Navigation](./forms-dashboard-navigation.md).
250
+
251
+ ---
252
+
253
+ ## Troubleshooting
254
+
255
+ | Error / symptom | Cause | Fix |
256
+ |---|---|---|
257
+ | `namespace must not be empty` / `namespace has size 0, expected 10 or more` on List Forms | The `namespace` query parameter is missing | Add `?namespace=wix.form_app.form` |
258
+ | `namespace filter is required` on a submissions query | `namespace` is missing from `query.filter`, or sent at the top level | Put `"namespace": "wix.form_app.form"` inside `query.filter` |
259
+ | `Permissions for given namespace not found: …` | The site doesn't have that app | Stop. Check [installed apps](../app-installation/list-installed-apps.md) and tell the user. Don't try other namespaces |
260
+ | A bare `404` with no message | An invented URL such as `/forms/v4/forms` or `/form-schema-service/v4/submissions/...` | Use the URLs in STEP 2 exactly |
261
+ | `Sort contains unsupported condition` / `Filter contains unsupported condition` | A field outside the closed list, such as `submittedDate`, `_createdDate`, `submitter.contactId` or an answer key | Use `createdDate`, `contactId`, or the table in STEP 4 |
262
+ | `Field '$lt' is not supported for filter with operator '$eq'` | Two operators in one field object | One condition per operator under `$and` |
263
+ | `Filter contains unsupported operator` on Query Forms | Two operators in one field object | One condition per operator under `$and` |
264
+ | `Field 'createdDate' is using non allowed operator '$ge'` | `$ge` / `$le` | Use `$gte` / `$lte` |
265
+ | The user says a form is missing from the list | List Forms defaults to `enabled=true` | Call again with `enabled=false` |
266
+ | `"forms": []` | Wrong namespace, no forms there, or (on List Forms) every form is disabled | Check the namespace (STEP 1) and call again with `enabled=false` before reporting "no forms" |
267
+
268
+ ---
269
+
270
+ ## Related Documentation
271
+
272
+ - [Update Form](./update-form.md) and [Create Form](./create-form.md) — changing or building a form
273
+ - [Forms Dashboard Navigation](./forms-dashboard-navigation.md) — links to a form and its submissions table
274
+ - [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) · [Query Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/query-forms) · [Get Form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/get-form)
275
+ - [Query Submissions By Namespace](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/query-submissions-by-namespace) · [Count Submissions](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/count-submissions)
276
+ - [About Submission Values](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/about-submission-values) — what each field type stores
277
+ - [About the Wix API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) — `$and`, `$or`, paging
@@ -4,6 +4,9 @@ description: "Changes a Wix form that already exists, with Form Schemas v4 `PATC
4
4
  ---
5
5
  # RECIPE: Update a Wix Form
6
6
 
7
+ > These calls need the Wix Forms app on the site (`appDefId` `225dd912-7dea-4738-8688-4b8c6955ffc2`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
8
+
9
+
7
10
  > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`. Send `wix-site-id: <SITE_ID>` when the token is account-scoped.
8
11
 
9
12
  Change what a form collects — **add a field, relabel one, tighten a rule, reorder, retire one** — on a form that already exists. **Composing the field itself is not here**: [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields) owns the `identifier` / `inputType` / `componentType` table and the options/enum shapes, and [Create Form](./create-form.md) § Silent breakers apply to an added field exactly as to a created one.
@@ -14,6 +17,8 @@ Change what a form collects — **add a field, relabel one, tighten a rule, reor
14
17
 
15
18
  ## The call
16
19
 
20
+ **No `formId` yet** ("my contact form")? List the forms and pick it by `name`: `GET https://www.wixapis.com/form-schema-service/v4/forms?namespace=wix.form_app.form&fieldsets=METADATA` returns only names and IDs. That call skips disabled forms; if the form isn't there, call again with `&enabled=false`.
21
+
17
22
  ```bash
18
23
  # 1 · read the form back: you need its current revision, and every field you intend to keep
19
24
  curl -X GET \
@@ -37,6 +42,7 @@ curl -X PATCH \
37
42
 
38
43
  - **⚠️ `namespace` is a REQUIRED query parameter on the read, and this is what a revise run trips over.** Without it the read returns `400 namespace has size 0, expected 10 or more, namespace must not be empty` — a violation naming a *field*, so it reads like a body problem. Fix the call, don't reshape the payload. (The filter on `POST .../v4/forms/query` needs it too.)
39
44
  - **The read-back is the body.** Apply your change to what the `GET` returned and send that as `form`. `namespace` is **immutable** and travels along; **there is no `fieldMask`**, and no `revision` outside `form` — inventing either is a silent partial write.
45
+ - **⚠️ Delete the legacy `fields` array before you send.** The read-back carries `fields` (the old field list) next to `formFields`. Send both and the old list wins: the `PATCH` returns `200` and bumps `revision`, but a field you added only to `formFields` is dropped, and only its layout item is kept. Spreading the whole form (`{ ...form, formFields }`) does exactly this. Remove `fields` and `deletedFields` first: `const { fields, deletedFields, ...body } = form`.
40
46
  - **⚠️ Append to `formFields`; never rebuild the entries you read.** `[...form.formFields, newField]` works. Mapping the array to "clean up" each field — dropping `fieldType`, re-shaping an options block — fails with `fieldType cannot be provided with any these fields: input_options, display_options` on **every** field at once. The read-back's field objects are already a valid write shape: pass them through untouched and touch only the one field you are changing.
41
47
  - **`formFields` is replaced wholesale.** Wix: *"Any field that's missing from the array you send is moved to `deletedFormFields`, so resend every field you want to keep."* Same for `steps[].layout` — miss an item and that field goes unplaced, which renders empty. Drops are recoverable from `deletedFormFields`, but nothing announces them.
42
48
  - **A stale `revision` is rejected** — re-`GET` and re-apply; never guess or increment it.
@@ -105,6 +111,7 @@ Then hand back the dashboard links ([Forms Dashboard Navigation](./forms-dashboa
105
111
  | `fieldType cannot be provided with any these fields: input_options, display_options` — on every field | The read-back's `formFields` were re-mapped or "cleaned" before sending | Send the fields exactly as read and append the new one: `[...form.formFields, newField]` |
106
112
  | `inputType enum must be in [UNKNOWN_INPUT_TYPE, STRING, NUMBER, …]` | An invented `inputType` such as `ENUM` (with an `enumOptions` block) for a choice field | A dropdown or radio is `inputType: "STRING"` with `stringOptions.componentType`; multi choice is `ARRAY` |
107
113
  | The `PATCH` is rejected for a `revision` mismatch | Someone (or an earlier call) updated the form since your read | Re-`GET` and re-apply the change; never increment the revision yourself |
114
+ | The `PATCH` returns `200` and bumps `revision`, but the new field is missing from the read-back (its layout item is there) | The body still carried the legacy `fields` array from the read-back, and the server applied that old list | Remove `fields` and `deletedFields` from the body, re-`GET`, and send again. Don't retry the same body |
108
115
  | Fields that were on the form are gone after the update | `formFields` was sent partial — the omitted fields moved to `deletedFormFields` | Re-send them in a further `PATCH`, from `deletedFormFields` in the read-back; always send the whole array |
109
116
  | Surviving fields render empty for the owner | `steps[].layout` was sent without their items | Re-send every layout item, including `SUBMIT_BUTTON`'s; re-verify with `/summary` |
110
117
  | The added dropdown/radio reads back as a text input with `textInputOptions` | `identifier` was `TEXT_INPUT` rather than the choice kind — `componentType` alone doesn't route the renderer | Set `identifier` to the choice kind and re-send. Deleting and re-adding the field with the same `identifier` reproduces it ([Create Form](./create-form.md) § Choice fields) |
@@ -115,6 +122,7 @@ Then hand back the dashboard links ([Forms Dashboard Navigation](./forms-dashboa
115
122
 
116
123
  ## Related Documentation
117
124
 
125
+ - [Read Forms and Submissions](./read-forms-and-submissions.md) — finding the form to update when you have no `formId` yet
118
126
  - [Create Form](./create-form.md) — composing fields, the identifier table, choice fields, the layout rules, plan caps
119
127
  - [Forms Dashboard Navigation](./forms-dashboard-navigation.md) — the builder and submissions links to hand back
120
128
  - [Update Form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/update-form) — the `PATCH` contract and its replace semantics
@@ -4,6 +4,9 @@ description: Creates subscription and one-time payment plans using Plans API. Co
4
4
  ---
5
5
  # Technical Step-by-Step Instructions: Creating or Updating a Wix Pricing Plans (Real-World, API-First)
6
6
 
7
+ > These calls need the Wix Pricing Plans app on the site (`appDefId` `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
8
+
9
+
7
10
  ## Description
8
11
  Below are the recommended steps to successfully create or update a Wix Pricing Plans (or several at once) on Wix and attach a booking session to a pricing plan, with real-world troubleshooting and fixes for common API issues.
9
12
 
@@ -4,6 +4,9 @@ description: Configures restaurant menus, sections, and items using Menus API. C
4
4
  ---
5
5
  # Wix Restaurants Setup API Reference
6
6
 
7
+ > These calls need the Wix Restaurants Menus app on the site (`appDefId` `b278a256-2757-4f19-9313-c05c783bec92`; online ordering is Wix Restaurants Orders `9a5d83fd-8570-482e-81ab-cfa88942ee60`, reservations Wix Table Reservations `f9c07de2-5341-40c6-b096-8eb39de391fb`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds one by that id.
8
+
9
+
7
10
  This recipe covers setting up and configuring Wix Restaurants using the REST API, including menus, items, and ordering configuration.
8
11
 
9
12
  ## Prerequisites
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Manage URL Redirects on a Wix Site"
3
- description: "Retrieve, create, and delete URL redirects on a Wix site using the public SEO Redirects API. Covers exact and group redirects, language-scoped redirects for multilingual sites, batches of up to 500, and the change flow for a redirect that already exists. This API has no query, search, or update method: List Redirects is the only read-many. Redirects do not chain, so creating one that points at a path another redirect starts from permanently deletes that other redirect; list and check before every write."
3
+ description: "Retrieve, create, and delete URL redirects on a Wix site using the public SEO Redirects API. Covers exact and group redirects, language-scoped redirects for multilingual sites, bulk creates of up to 100 and bulk deletes of up to 500, and the change flow for a redirect that already exists. This API has no query, search, or update method: List Redirects is the only read-many. Redirects do not chain, so creating one that points at a path another redirect starts from permanently deletes that other redirect; list and check before every write."
4
4
  ---
5
5
 
6
6
  # Manage URL Redirects on a Wix Site
@@ -72,6 +72,12 @@ directly - do not go looking for the shapes in the docs first.
72
72
  | Bulk Create Redirects | `POST /bulk/redirects/create` |
73
73
  | Bulk Delete Redirects | `POST /bulk/redirects/delete` |
74
74
 
75
+ **`POST /redirects` is not Create Redirect.** It looks like the standard create
76
+ path, but it is not part of this API and rejects a `{ "redirect": ... }` body
77
+ with a 400. Create one redirect with `POST /create-redirect` and many with
78
+ `POST /bulk/redirects/create`. Do not build any other path from the method
79
+ names: `/list-redirects` and `/redirects/query` return 404.
80
+
75
81
  Create Redirect takes the redirect nested under `redirect`. `options` and
76
82
  `language` are optional, `id` only when preserving an existing redirect's
77
83
  identity:
@@ -185,7 +191,7 @@ count as the same path.
185
191
 
186
192
  **There is no query endpoint and no search endpoint.** Most Wix APIs have one, so
187
193
  this is the second place an agent goes wrong. Do not call, construct, or go
188
- looking for `POST /v1/redirects/query`, a `/search` path, or any filtered variant:
194
+ looking for `POST /v1/redirects/query`, `/list-redirects`, a `/search` path, or any filtered variant:
189
195
  they do not exist, and trying one wastes a turn and returns nothing useful.
190
196
 
191
197
  - **List Redirects** returns every redirect on the site in one response. It takes
@@ -213,8 +219,9 @@ redirect is not in effect, and if the create fails the old redirect is gone.
213
219
 
214
220
  ## Batches
215
221
 
216
- **Bulk Create Redirects** and **Bulk Delete Redirects** take 1 to 500 items and
217
- report each one separately **inside a successful response**:
222
+ **Bulk Create Redirects** takes 1 to 100 redirects and **Bulk Delete Redirects**
223
+ takes 1 to 500 IDs. A larger list is rejected as a whole with a 400, so split it
224
+ first. Both report each item separately **inside a successful response**:
218
225
 
219
226
  - Read every outcome from `results[].itemMetadata`, matched to your request by
220
227
  `originalIndex`. A failed item carries `error.code`, such as `FROM_URL_EXISTS`
@@ -225,6 +232,28 @@ report each one separately **inside a successful response**:
225
232
  - A malformed request, such as an empty list, is rejected as a whole with a 400
226
233
  and returns no per-item results.
227
234
 
235
+ There is no import endpoint. To migrate a list of old URLs, such as a CSV from
236
+ another platform, follow this path and nothing else:
237
+
238
+ 1. Parse the whole list before any call. Skip the header row, trim whitespace,
239
+ and drop exact duplicate rows. Each row is one exact redirect unless the user
240
+ asked for a whole section.
241
+ 2. Call **List Redirects** once and run the checks above against every row. If
242
+ either check matches any row, the same rule applies as for a single create:
243
+ name every row and every existing redirect at stake, end your turn without
244
+ writing, and continue only after the user answers. A row whose `to` equals an
245
+ existing redirect's `from` is the dangerous one - Bulk Create deletes that
246
+ redirect with no error to catch afterwards. If nothing matched, continue in
247
+ the same turn.
248
+ 3. Split the rows into chunks of 100 and call **Bulk Create Redirects** once per
249
+ chunk, in order. 250 rows is three calls: 100, 100, then 50.
250
+ 4. Read each chunk's `results[].itemMetadata` and keep a running count. Never
251
+ delete a redirect that reported success in order to create it again, and
252
+ never resend a chunk that succeeded. A success with no `id` means the same
253
+ redirect was already on the site, not that the write was lost.
254
+ 5. Report the total from those results. Call List Redirects again only if
255
+ `bulkActionMetadata.undetailedFailures` was not `0`.
256
+
228
257
  Two more sharp edges to report truthfully:
229
258
 
230
259
  - A successful **Bulk Delete** item means the deletion was found and sent, not
@@ -1,55 +1,21 @@
1
1
  ---
2
2
  name: "Create Headless Site"
3
- description: Creates a Wix Headless site (headless business) with one account-level API call — site, Wix Business Solution apps, and a configured OAuth client.
3
+ description: Creates a Wix Headless website: a site in the user's Wix account whose frontend is files uploaded to Wix hosting, with the Wix business backend behind it through APIs. The site is created and its pages put live by Upload a Website or HTML Files; a Wix Business Solution (a store, blog, bookings and more) is then integrated into it by the Wix Headless kit, from its cold start.
4
4
  ---
5
5
  # Create Headless Site
6
6
 
7
- 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.
8
-
9
- > Do NOT use the [Create Site from Template](create-site-from-template.md) API for headless sites — it only tags the site's namespace and skips the headless setup entirely.
10
-
11
- ## Prerequisites
12
-
13
- - Wix account with site creation permissions
14
- - Account-level API access
15
-
16
- ## Provision a Headless Business
17
-
18
- **Endpoint**: `POST https://www.wixapis.com/headless-business-setup/v1/headless-business/provision`
19
-
20
- **Request Body**:
21
- ```json
22
- {
23
- "origin": "agent-<your-agent-id>",
24
- "newMetasite": {
25
- "namingStrategy": { "metaSiteName": "My Headless Business" },
26
- "seedOptions": [
27
- { "businessSolution": "STORES", "clearTemplateContent": true, "seedDemoContent": false }
28
- ]
29
- },
30
- "synchronousSteps": ["SET_METASITE_NAME", "CONFIGURE_HEADLESS_APP"]
31
- }
32
- ```
33
-
34
- - `origin` — `agent-` followed by your own identifier: a short, stable, lowercase-hyphenated slug for the coding agent or tool you are (e.g. `claude-code`, `cursor`, `codex-cli`, `windsurf`, `github-copilot`, or your product's name; `unknown-agent` if you can't name yourself). It records which agent created the site
35
- - `namingStrategy` — exactly one of: `metaSiteName` (exact display name), `llmPromptBasedName: {}` (name derived from the top-level `prompt` field), or `defaultName: {}`
36
- - `seedOptions` — Wix Business Solution apps to install at creation: `STORES`, `BLOG`, `BOOKINGS`, `EVENTS`, `PORTFOLIO`, `PRICING_PLANS`. Each entry takes `clearTemplateContent` (remove sample content) and `seedDemoContent` (seed demo content). Empty installs none
37
- - `synchronousSteps` — steps to complete before the call returns: `SET_METASITE_NAME`, `CONFIGURE_HEADLESS_APP`, `SEED_CONTENT`. Omitted steps run asynchronously. Include `CONFIGURE_HEADLESS_APP` when the OAuth client must be usable immediately
38
-
39
- **Response**:
40
- ```json
41
- { "metaSiteId": "<SITE_ID>", "appId": "<OAUTH_CLIENT_ID>" }
42
- ```
43
-
44
- `appId` is the site's OAuth client ID — do NOT create a separate OAuth app.
45
-
46
- ## Existing Sites
47
-
48
- To provision headless onto an existing site, pass `"existingMetasite": {}` instead of `newMetasite`. This is a site-level call in the context of that site.
49
-
50
- ## Next Steps
51
-
52
- After creating the site:
53
- - Install additional apps using [Install Wix Apps](../app-installation/install-wix-apps.md)
54
- - Add content (products, services, blog posts, etc.)
55
- - Use the `appId` as the `client_id` to mint visitor tokens and make buyer-facing API calls — see [Manage OAuth Apps](manage-oauth-apps.md)
7
+ A Wix Headless site is a site in the user's Wix account whose frontend is files
8
+ uploaded to Wix hosting and served at a `*.wix-site-host.com` URL, with the Wix
9
+ business backend (stores, bookings, forms, a CMS) behind it through APIs. It comes
10
+ to be in two steps:
11
+
12
+ 1. **Create the site and put its pages live**: [Upload a Website or HTML Files](upload-static-site.md),
13
+ online at https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md.
14
+ It holds the call that creates the site, then uploads the pages, the user's or
15
+ ones you write, and changes them later on the same site and URL.
16
+ 2. **Integrate Wix Headless into it**: a Wix Business Solution built on shipped code (a
17
+ store, a blog, bookings, events, a CMS, forms, members and more, with its pages,
18
+ data layer and seed) comes from the Wix Headless kit, starting at its cold start,
19
+ https://www.wix.com/skills/headless-cold-start/headless-kit.md. It takes a machine
20
+ from nothing (the skills, the Wix CLI sign-in) to a built, seeded, released site on
21
+ the same site and URL; the upload recipe says how to run it with no shell of your own.
@@ -147,8 +147,8 @@ Use the `access_token` as the `Authorization` header on subsequent API calls.
147
147
 
148
148
  ## API Reference
149
149
 
150
- - [OAuth Apps — Create](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/create-o-auth-app)
151
- - [OAuth Apps — Get](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/get-o-auth-app)
152
- - [OAuth Apps — Query](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/query-o-auth-apps)
153
- - [OAuth Apps — Update](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/update-o-auth-app)
150
+ - [OAuth Apps — Create](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/create-oauth-app)
151
+ - [OAuth Apps — Get](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/get-oauth-app)
152
+ - [OAuth Apps — Query](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/query-oauth-apps)
153
+ - [OAuth Apps — Update](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/update-oauth-app)
154
154
  - [Retrieve Tokens — `/oauth2/token` contract, all grant types](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens)
@@ -51,6 +51,10 @@ Response:
51
51
  - **Wix Blog** (ID: `14bcded7-0066-7c35-14d7-466cb3f09103`)
52
52
  ```
53
53
 
54
+ The app list reflects installs after a delay: an app installed a few minutes ago can be missing here
55
+ while its own API already answers. To check an install you just made, read the site's instances with
56
+ [List Installed Apps](../app-installation/list-installed-apps.md), which is immediate.
57
+
54
58
  ### Without siteId
55
59
 
56
60
  ```bash