Wix Headless
WixOfficialPublished by Wix
- Skill
- Tool integration
- Software development
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The wix-headless skill acts as an orchestrator for integrating Wix business services (such as Stores, Bookings, and CMS) into a headless frontend architecture. It handles the end-to-end configuration of the Wix backend, including app installation, content seeding, and the generation of a tailored SDK integration guide. Depending on the project type (managed, self-managed, or stripe), the skill can either provide a comprehensive integration guide for the user to implement or, in managed scenarios, actively scaffold, wire, and deploy the frontend project.
What it does
- Infers required Wix capabilities based on user intent and project context.
- Installs necessary Wix apps and seeds backend content automatically.
- Generates a custom SDK integration guide for calling Wix services from the frontend.
- Scaffolds or connects existing frontend projects to Wix for managed hosting.
- Handles project-type-specific authentication and deployment workflows.
- Provides a mechanism to relay feedback to Wix regarding the headless experience.
When to use it
- When you need to integrate Wix business services into a custom-built headless frontend.
- When you want to automate the setup and content seeding of a Wix backend.
- When you are building a new site on Wix infrastructure and need a scaffolded frontend.
- When you have an existing frontend design and need to wire it to Wix business capabilities.
- When working with Stripe Projects and requiring a Wix backend configuration.
Advantages
- Reduces manual configuration by automating app installation and content seeding.
- Provides a clear, actionable SDK integration guide tailored to your specific capabilities.
- Supports multiple project architectures including managed, self-managed, and Stripe-based setups.
- Ensures consistent backend setup by following verified inline recipes.
- Simplifies the transition from design to a functional, Wix-powered headless site.
Usage examples
- “Set up a Wix Headless backend for a store with products and a blog.”
- The skill will install the Stores and Blog apps, seed sample products and posts, and provide an SDK guide for fetching this data in your frontend.
- “I have an existing design; connect it to Wix and host it on their managed infrastructure.”
- The skill will initialize the project, wire the existing UI to the necessary Wix business services, and prepare it for release on Wix.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/wix/wix-headless/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip wix-headless.zip -d .agents/skills
Documentation by Wix
Wix Headless
This skill connects Wix business services to a Wix Headless frontend. Its core job is to configure the Wix backend: infer the needed capabilities, install the Wix apps, seed the backend content, and produce an SDK-integration guide describing how to call Wix from the frontend.
What happens with the frontend depends on the project type and operation:
Backend-only (self-managed, stripe, or a managed "just set up the backend" run) — the skill emits the SDK guide as its final output; the host owns the frontend, build, and hosting.
Managed create / connect — the skill also owns the frontend: it scaffolds a new project (create) or attaches Wix to an existing one (connect), wires it to the backend using that same guide, builds, and releases to Wix. (There is no Designer or template library — the frontend is built ad-hoc to intent.)
On a backend-only run the skill does not own the project scaffolding. When the work needs a frontend, scaffold it according to user intent — framework and structure follow the prompt; the skill's job is the Wix backend plus the emitted SDK guide describing how to call Wix from whatever frontend exists, not choosing or generating the app. This is the norm for a stripe run: the project is provisioned via Stripe Projects (credentials land in
.env— seestripe/AUTHENTICATION.md), the skill configures the backend and emits the guide, and the live site is finalized perstripe/DEPLOYMENT.md— while the frontend is scaffolded and wired to intent, by the host.
Project types
The skill behaves identically across project types except for authentication and deployment, which are isolated in a per-type folder under references/:
| Project type | Hosting | Authentication & deployment live in |
|---|---|---|
managed | Wix infrastructure (maintained by Wix) | references/managed/ |
self-managed | the user's own host (TBD) | references/self-managed/ |
stripe | the user's own host, provisioned via Stripe Projects | references/stripe/ |
Everything else — Discovery, Setup, Seed, the SDK handoff — is project-type-agnostic and refers to "the provided authentication mechanism" rather than any specific method.
Resolving the project type
Resolve the type before Discovery, in this order — stop at the first that decides:
Caller-provided. If the host/caller passed a project type (
managed|self-managed|stripe), use it. An explicit value always wins.Detect from project signals (on disk). Check the working directory (read-only):
stripe—.envcarriesWIX_WIX_CLIENT_ID/WIX_WIX_CLIENT_SECRET/WIX_WIX_METASITE_ID(or the plainWIX_*fallback). This is the Stripe-Projects fingerprint.managed— a Wix CLI project:wix.config.jsonpresent, or a.wix/directory, or@wix/cli/@wix/astroinpackage.json.self-managed— a frontend project on disk (e.g.package.jsonwith a bundler/framework) with neither the Stripe.envfingerprint nor the Wix-CLI markers above.
Detect from user intent. If disk is inconclusive, read the prompt:
managed— "managed", "host on Wix", "Wix-hosted", "deploy to Wix", "wix release".stripe— "stripe projects", "I added Wix via Stripe", a Stripe-Projects context.self-managed— "self-hosted", "my own host", names a non-Wix host, "I'll deploy it myself".
Ask. If signals are absent or conflict, ask the user which type applies — don't guess.
Hold the resolved type in scratch; it selects <TYPE_DIR> (see Path resolution). Note self-managed is TBD — once resolved to it, the auth step will stop with a clear "not wired yet" error.
Resolving the operation (managed only)
create/connect/iterate are managed-only. For managed, resolve the operation by intent first, directory second — never let an empty directory override what the user is asking for. Check iterate first (it's decided by an unambiguous on-disk signal):
iterate→references/managed/CONNECT.md. The project is already connected to Wix — awix.config.json(or.wix/) is already present — and the owner wants to add or change capabilities. Same flow asconnect, but §1 skipsinitand reuses the existingwix.config.json; never re-initan already-connected project.connect→references/managed/CONNECT.md. The user brings a design not yet connected to Wix and wants it wired: a frontend project on disk without awix.config.json, or a brought-in/fetched design (a.zip/folder/file you unzip or read, a design-file URL, a Claude-Design/v0/Lovable export), or language like "connect this / implement this design (… connecting to Wix) / host this on Wix / deploy this to Wix / add Wix Headless to this project". A brought-in or fetched design isconnecteven when the current directory is empty — the design arrives from elsewhere (zip/fetch/URL), so emptiness at trigger time is not a create signal. (CONNECT.mdstep 1 places the brought design into CWD, theninits it.)create→references/managed/CREATE.md. The user wants a new site built from a prompt with nothing brought in — "build me a site / store / blog…", no design file, no project on disk.backend-only— the user only wants the backend configured (no frontend work). → the shared spine + emit the SDK handoff.
For self-managed and stripe, the operation is always backend-only (the host owns the frontend). Only when there is genuinely no brought-in design and no connect language does directory emptiness decide: empty → create; an existing frontend on disk → connect.
Preconditions (the host provides these — we read, never create)
The project type —
managed|self-managed|stripe— provided by the caller, else detected from project signals / user intent (see Project types § "Resolving the project type"), else asked. It selects<TYPE_DIR>(see Path resolution).A Wix metasite + a headless OAuth app exist, and credentials are available — obtained via the project type's
AUTHENTICATION.md. The skill needs a bearer token authorized for the metasite and the metasite id.The user intent — free text describing what Wix should power ("add a store", "blog + contact form", "persist my app's data").
(Optional) the project on disk — read-only, to sharpen brand/capability inference.
If the credentials are absent, the Wix backend isn't reachable — stop with a clear error.
What this skill does
Always open DISCOVERY.md first (it's agnostic — capability/brand/intent inference + the imagery gate, no auth). Then route by project type + operation:
Backend-only (self-managed, stripe, or managed backend-only) — the lean spine:
Discovery (
references/DISCOVERY.md) — infer capabilities + brand + intent + imagery.Setup (
references/SETUP.md) — install the Wix apps those capabilities need.Seed (
references/SEED.md) — create the backend content (+ entity images if imagery is on).Handoff (
references/SDK_HANDOFF.md) — after Setup and Seed, emit the integration guide: SDK bootstrap, per-capability call shapes, the seeded IDs, and the@wix/*package list.Finalize deployment (
<TYPE_DIR>/DEPLOYMENT.md) — run the project-type's finalize steps.
Throughout any run — if the user asks to send feedback to Wix, complains/gets frustrated, or the
run hits any real friction (a confusing error, a doc gap, a tooling dead end, a workaround you had to
invent — it doesn't need to repeat), offer to relay it to Wix per references/FEEDBACK.md. Default
to offering rather than waiting to be asked. Every flow's finalize step (<TYPE_DIR>/DEPLOYMENT.md /
managed/CREATE.md / managed/CONNECT.md) ends with the same checkpoint — treat it as a required
self-check, not optional. Send only after an explicit yes — never automatically.
Managed create / connect / iterate — after Discovery, hand the whole run to the managed flow:
create →
references/managed/CREATE.md(scaffold → Setup → Seed → build the frontend → release).connect →
references/managed/CONNECT.md(init → Setup → Seed → wire the existing UI → release).iterate →
references/managed/CONNECT.md— the project is already connected, so it reuses the existingwix.config.json(noinit). Setup / Seed / wiring are incremental: it may already be set up and seeded from a prior run, so the agent checks current state first (installed apps, already-seeded content, existing wiring) and applies only the delta the new intent needs — never blindly re-installing or re-seeding. Re-release only if the frontend build output changed. These reuse the sameSETUP.md/SEED.md/SDK_HANDOFF.md, but apply the SDK guide to build/wire the frontend themselves rather than emitting it, and release viamanaged/DEPLOYMENT.md.
Each Wix call uses the universal call shape (SETUP.md §1) with $TOKEN/$SITE_ID obtained per <TYPE_DIR>/AUTHENTICATION.md. The skill runs non-interactively except for the one imagery question (and asking the project type if it can't be resolved).
Don't smoke-test the frontend locally unless the user asks to verify. The deliverable is the built-and-released site (managed) or the SDK guide (backend-only) — not a local test report. By default do not start a dev server (
wix dev/astro dev/npm run dev) to curl pages, drive the cart / booking / login flow, or launch a headless browser: correctness comes from following the recipes, real errors surface atwix build/wix release, and a headless run can't complete an interactive login or a real payment anyway — so these loops routinely burn minutes of wall for little signal (this is distinct from, and in addition to, the "release once at the very end" rule — that one only bans extra build+release cycles, not dev-server testing). Only spin up a dev server and smoke-test when the user's prompt explicitly asks to verify / test / confirm it works — and then keep it to a single lightweight pass (pages compile and render), not a full purchase/booking/login drive. The one post-release check in<TYPE_DIR>/DEPLOYMENT.mdis the sanctioned verification.
Donations exception to the smoke-test policy above: for a build that accepts donations, follow
the bounded anonymous API handoff check in references/inline-recipes/how-to-code-donations.md
before claiming it works. It does not authorize a payment or campaign mutation, and does not require
a dev-server testing loop. That recipe also defines the separate hosted-checkout and payment checks.
Path resolution
Compute <SKILL_ROOT> from this file (<SKILL_ROOT>/SKILL.md — strip /SKILL.md); hold the absolute path in scratch. Then resolve the project type to its folder and hold it too:
<TYPE_DIR>=<SKILL_ROOT>/references/<projectType>/— one ofmanaged/,self-managed/,stripe/.
| What | Path |
|---|---|
| Vertical index (intent matching + per-vertical site spec) | <SKILL_ROOT>/references/CAPABILITIES.md |
| Discovery (infer capabilities + brand + intent; existing site → the Dynamic Context call in §1) | <SKILL_ROOT>/references/DISCOVERY.md |
| Setup (install apps) | <SKILL_ROOT>/references/SETUP.md |
| Seed (create backend content) | <SKILL_ROOT>/references/SEED.md |
| SDK-integration handoff (emitted, or applied by create/connect) | <SKILL_ROOT>/references/SDK_HANDOFF.md |
| Image generation (opt-in; agnostic) | <SKILL_ROOT>/references/IMAGE_GENERATION.md |
| Design — fallback visual quality bar for the built frontend, when the user gave no design direction of their own (managed create only) | <SKILL_ROOT>/references/DESIGN.md |
| Content — fallback copy quality bar for the built frontend, when the user gave no copy/voice direction of their own (managed create only) | <SKILL_ROOT>/references/CONTENT.md |
| Experience overlays — a vertical's own design + copy bar on top of DESIGN/CONTENT (optional per vertical; read when that vertical is loaded) | <SKILL_ROOT>/references/inline-recipes/experience-<vertical>.md (today: experience-store.md, experience-donations.md) |
| AI features — text/chat + embeddings (opt-in; agnostic) | <SKILL_ROOT>/references/AI_FEATURES.md |
| Feedback — relay the user's headless-experience feedback to Wix (opt-in; user-approved) | <SKILL_ROOT>/references/FEEDBACK.md |
Authentication — obtain $TOKEN/$SITE_ID/clientId (project-type-specific) | <TYPE_DIR>/AUTHENTICATION.md |
| Deployment — finalize the live site (project-type-specific) | <TYPE_DIR>/DEPLOYMENT.md |
| Managed create flow (scaffold a new project) | <SKILL_ROOT>/references/managed/CREATE.md |
| Managed connect flow (wire an existing project) | <SKILL_ROOT>/references/managed/CONNECT.md |
| Frontend-axis references (how a frontend wires to Wix) | <SKILL_ROOT>/references/astro.md, non-astro.md |
Start a run by opening DISCOVERY.md. The flow files (CAPABILITIES, DISCOVERY, SETUP, SEED, SDK_HANDOFF, IMAGE_GENERATION, AI_FEATURES) are project-type-agnostic; the per-type specifics live under <TYPE_DIR>/ (AUTHENTICATION.md, DEPLOYMENT.md, and — managed only — CREATE.md/CONNECT.md).
Where the how comes from
This skill has no skill upstream — the how is read from the live Wix docs at dev.wix.com/docs. Read-priority: a page this skill links is read by curl-ing its .md twin directly (first priority — don't re-discover a curated link with search); the Wix MCP doc/search tools are second priority, for finding pages the skill doesn't link or as a fallback if a fetch fails. (Append .md to any docs URL for raw markdown; menu pages list child links, content pages carry the schema.)
Doc discovery is the shared fallback for both tracks — never the first move. Each track's primary source is its pinned material (below); when that doesn't cover what you need, fall back to references/DOC_DISCOVERY.md — a semantic doc-search + schema lookup that works with or without the Wix MCP.
Seed reads each capability's create flow from its inline recipe — a self-contained local
inline-recipes/setup-*.md(mapped per capability inSEED.md§ "What to seed per capability") that inlines the calls and supersedes the REST doc pages, so read it and seed from it alone. Only a capability with no inline recipe (e.g.coupons) falls back to doc discovery (DOC_DISCOVERY.md).Handoff links the SDK docs for each capability's API shape, and supplies the runtime package set from the inlined map in
SDK_HANDOFF.md(the SDK.mdpages don't expose@wix/*import strings to navigation, so packages are mapped, not navigated).
Setup carries its app-install call (and the appDefId constants) inline in SETUP.md; CAPABILITIES.md is the vertical index that lets Discovery match intent and declares, per built vertical, the Required site features + Implementation checklist that Seed enables (backend-backed features) and the Handoff carries into the guide (so the host builds a complete site, not a bare data dump). This skill carries the what (which capabilities, how much content, what a finished site includes) and reads the how off the docs.
Files
- ATTRIBUTION.mdAdded by AutoGineer811 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md16.0 KiB
- references/AI_FEATURES.md10.3 KiB
- references/CAPABILITIES.md20.6 KiB
- references/CONTENT.md3.8 KiB
- references/DESIGN.md5.3 KiB
- references/DISCOVERY.md8.2 KiB
- references/DOC_DISCOVERY.md2.5 KiB
- references/FEEDBACK.md8.0 KiB
- references/IMAGE_GENERATION.md7.3 KiB
- references/SDK_HANDOFF.md22.5 KiB
- references/SEED.md21.6 KiB
- references/SETUP.md5.1 KiB
- references/astro.md17.3 KiB
- references/inline-recipes/experience-donations.md8.0 KiB
- references/inline-recipes/experience-store.md8.2 KiB
- references/inline-recipes/how-to-code-a-blog.md18.8 KiB
- references/inline-recipes/how-to-code-a-store.md52.6 KiB
- references/inline-recipes/how-to-code-bookings.md28.2 KiB
- references/inline-recipes/how-to-code-cms.md15.3 KiB
- references/inline-recipes/how-to-code-donations.md10.9 KiB
- references/inline-recipes/how-to-code-events.md21.4 KiB
- references/inline-recipes/how-to-code-forms.md43.7 KiB
- references/inline-recipes/how-to-code-members-astro.md11.7 KiB
- references/inline-recipes/how-to-code-members-custom-login.md15.0 KiB
- references/inline-recipes/how-to-code-members-non-astro.md12.4 KiB
- references/inline-recipes/how-to-code-portfolio.md11.7 KiB
- references/inline-recipes/how-to-code-pricing-plans.md18.3 KiB
- references/inline-recipes/how-to-code-rentals.md19.6 KiB
- references/inline-recipes/how-to-code-restaurant-orders.md16.8 KiB
- references/inline-recipes/how-to-code-restaurant-reservations.md19.0 KiB
- references/inline-recipes/how-to-code-restaurants.md11.9 KiB
- references/inline-recipes/setup-blog.md14.2 KiB
- references/inline-recipes/setup-bookings.md19.8 KiB
- references/inline-recipes/setup-cms.md20.5 KiB
- references/inline-recipes/setup-donations.md981 B
- references/inline-recipes/setup-events.md14.1 KiB
- references/inline-recipes/setup-forms.md18.7 KiB
- references/inline-recipes/setup-online-store.md17.0 KiB
- references/inline-recipes/setup-portfolio.md13.2 KiB
- references/inline-recipes/setup-pricing-plans.md17.1 KiB
- references/inline-recipes/setup-rentals.md24.6 KiB
- references/inline-recipes/setup-restaurant-experiences.md7.6 KiB
- references/inline-recipes/setup-restaurant-orders.md19.7 KiB
- references/inline-recipes/setup-restaurant-reservations.md11.6 KiB
- references/inline-recipes/setup-restaurants.md12.7 KiB
- references/managed/AUTHENTICATION.md4.2 KiB
- references/managed/CONNECT.md5.6 KiB
- references/managed/CREATE.md9.9 KiB
- references/managed/DEPLOYMENT.md8.5 KiB
- references/non-astro.md10.4 KiB
- references/self-managed/AUTHENTICATION.md1.2 KiB
- references/self-managed/DEPLOYMENT.md1.1 KiB
- references/stripe/AUTHENTICATION.md4.2 KiB
- references/stripe/DEPLOYMENT.md5.3 KiB
- scripts/bootstrap.mjsScript6.2 KiB
references/inline-recipes/setup-bookings.md
name: "Setup Bookings" description: Initializes a Wix Bookings backend with Services V2 — resolves a staff resource + a category, then creates bookable services (APPOINTMENT/CLASS) with duration, price, and online booking enabled, and schedules sessions for classes. Specifies the how (calls + format); counts and the specific services/durations/prices come from the request.
RECIPE: Business Recipe – Initial Setup for Wix Bookings (Services V2)
Standard call shape (every curl below). The
<AUTH>placeholder is shorthand forAuthorization: Bearer <TOKEN>only. Body-bearing requests also needContent-Type: application/json.
A concise checklist for turning a freshly provisioned Wix site with the Wix Bookings app installed into a populated catalog of bookable services.
Notice that this recipe is NOT meant for coding purposes and is ONLY meant for initial Bookings backend setup. (The frontend read/booking contract is the sibling recipe how-to-code-bookings.md.)
This recipe is the how, not the what. What to seed — how many services, which are appointments vs classes, their durations and prices, whether there are named categories or multiple staff — is determined by the request you're fulfilling. This recipe only specifies the calls and the request format; it does not decide quantities or which services to create.
API surfaces: services use Services V2 on the public host
https://www.wixapis.com/bookings/v2/.... The method page's schema header shows an internal…/_api/bookings/v2/servicesform — do not use that; call the public…/bookings/v2/servicesform shown below. Staff members are a V1 API (…/bookings/v1/staff-members). Class sessions are Calendar Events V3 (…/calendar/v3/events) — a different API from Bookings. The Wix Bookings app id (needed only by the frontend, kept here for reference) is13d21c63-b5ec-5912-8397-c3a5ddb27a97.
Article: Steps for Setting Up Wix Bookings
YOU MUST complete the following steps in the given order (1-4) without skipping any and without requiring additional user input. The Attach images step runs only when imagery is on — skip it entirely otherwise.
⚠️ CRITICAL ORDER REQUIREMENT: resolve a staff resource (STEP 1) and a category (STEP 2) BEFORE creating services (STEP 3). An APPOINTMENT service is rejected (MISSING_APPOINTMENT_RESOURCES) unless staffMemberIds is non-empty, and any service without a category.id is invisible on the live site (see STEP 3). For CLASS services, sessions are created after the service (STEP 4) because they need the service's returned schedule.id.
Check for pre-existing services first. A freshly provisioned Wix Bookings app may ship demo/sample services (e.g. "Sample service" rows) that would otherwise appear in the live storefront alongside yours — so before STEP 1, check and clean up only if needed:
List —
POST https://www.wixapis.com/bookings/v2/services/query<AUTH>with body{"query": {"paging": {"limit": 100}}}; collect everyservice.id.If any come back, delete them —
DELETE https://www.wixapis.com/bookings/v2/services/<serviceId><AUTH>for each. If the list is empty, there's nothing to clean — move on.
Clean the install's own demo services yourself via the API — that's part of this setup, so don't leave obvious sample services in place or push that work onto the user. But do not assume every existing service is a sample: the site may already hold the owner's real services (a connect/iterate run, or an owner-populated site). If what's there isn't obviously the install's demo data, or you're unsure, do not delete it — ask the user first (SEED.md: seeding is additive; deleting real content needs the owner's approval). When they clearly are install samples, delete them before creating yours. (The default "Business Owner" staff resource is a resource, not a service — leave it; you reuse it in STEP 1.)
STEP 1: Resolve a staff resource (REQUIRED for APPOINTMENT)
An APPOINTMENT service needs at least one resource in staffMemberIds; an empty array is rejected with MISSING_APPOINTMENT_RESOURCES ("service of type appointment requires at least one staff member or service resource"). CLASS services do not need this.
Query the existing staff to get a resourceId — a fresh install always has a default Business Owner resource:
curl -X POST 'https://www.wixapis.com/bookings/v1/staff-members/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{ "query": {}, "fields": ["RESOURCE_DETAILS"] }'⚠️ CRITICAL: staffMemberIds takes the resourceId, NOT the staff id. Read staffMember.resourceId from the response (it's a different GUID from staffMember.id). Using staffMember.id is the most common cause of "service has no provider" at runtime. Keep the resourceId (and staffMember.id + name) of every staff you'll use.
When the request wants named staff (e.g. a salon with multiple stylists — derived from the request, not invented), create them first, then use their resourceIds:
curl -X POST 'https://www.wixapis.com/bookings/v1/staff-members' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{ "staffMember": { "name": "<First Last>", "description": "<short brand-appropriate bio>" } }'⚠️ Do NOT send
"email": ""or"phone": ""— V1 format-validates them and rejects empty strings (is not a valid email/phone). Omit the keys unless you have a real value.Do NOT configure custom working hours during seed. New staff inherit the business working hours at creation time — that's enough for an initial build; the merchant sets custom hours from the dashboard. (The two-step custom-hours flow —
assignWorkingHoursSchedule+WORKING_HOURSevents — is fragile and out of scope here.)If the query returns "Business schedule not found", the Bookings app isn't installed/provisioned — fail loudly with the response verbatim; do not try to install it.
STEP 2: Resolve (or create) a category
⚠️ CRITICAL: every service needs a category.id or it is NOT visible on the live site. This is the Bookings analog of the Stores visible:true trap — a service created without a category is created successfully but hidden. A fresh Bookings install ships ZERO categories, so you must create at least one and assign it to every service. Do not assume a default "Our Services" category exists to reuse — it does not.
Query existing categories first (to reuse one if a prior step in this run already created it):
curl -X POST 'https://www.wixapis.com/bookings/v2/categories/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{ "query": {} }'On a fresh site this returns count: 0. Create a category — one is enough (name it "Our Services" or something brand-appropriate). Create additional named categories only when the request wants grouping/filtering (the frontend shows a category bar only when more than one category exists). One call per category (they're independent — no shared revision, unlike Stores categories):
curl -X POST 'https://www.wixapis.com/bookings/v2/categories' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{ "category": { "name": "Our Services" } }'The response is { "category": { "id": "<categoryId>", … } } — keep each id. A service belongs to one category; when you create several, distribute services across them so the filter is meaningful.
STEP 3: Create the services
Create all the services in a single bulk call against the public endpoint POST https://www.wixapis.com/bookings/v2/bulk/services/create (up to 100 services per call — services[]). How many services, their types, durations, and prices come from the request you're fulfilling — this step only gives the call and the required format. (A single-service POST …/bookings/v2/services with a top-level service object also exists, but prefer the bundled bulk call.)
⚠️ CRITICAL: the V2 service payload is FLAT — name/description/tagLine are top-level on each service object, NOT nested under info. The V1 info.name/info.description shape is rejected by V2. Price uses value (a string), not amount.
Request body shape (one paid 60-minute APPOINTMENT shown — repeat service objects inside the services array; APPOINTMENT and CLASS may be mixed in one call):
{
"services": [
{
"type": "APPOINTMENT",
"name": "Consultation",
"description": "A brand-appropriate description of the service.",
"tagLine": "Short tagline",
"defaultCapacity": 1,
"onlineBooking": { "enabled": true, "requireManualApproval": false, "allowMultipleRequests": false },
"schedule": { "availabilityConstraints": { "sessionDurations": [60] } },
"payment": {
"rateType": "FIXED",
"fixed": { "price": { "value": "75.00", "currency": "USD" } },
"options": { "online": true, "inPerson": false }
},
"category": { "id": "<CATEGORY_ID_FROM_STEP_2>" },
"locations": [ { "type": "BUSINESS" } ],
"staffMemberIds": ["<RESOURCE_ID_FROM_STEP_1>"]
}
],
"returnEntity": true
}⚠️ CRITICAL FORMAT REQUIREMENTS:
category.idis mandatory for visibility (STEP 2). Assign one to every service.onlineBooking: { "enabled": true }is required for all services — V2 rejects the create without it, even though it reads as optional.defaultCapacityis required for ALL types —1for APPOINTMENT; the max participants for CLASS (e.g.20).payment.options— at least one ofonline/inPersonmust betrue(see the validation table below). This holds even for free services.schedule.availabilityConstraints.sessionDurations— required for APPOINTMENT only (an array with one integer in minutes). Do not send it for CLASS/COURSE.staffMemberIds— required and non-empty for APPOINTMENT (pass theresourceId(s) from STEP 1; the default Business-OwnerresourceIdwhen the request names no staff). Ignored for CLASS/COURSE — omit it.locations[].type— use"BUSINESS", never"OWNER_BUSINESS"(the services endpoint rejects it;OWNER_BUSINESSis valid only oncreateBooking's slot location — same field name, different enum).Currency — the site's business currency wins: a EUR-locale site stores
EUReven if you sendUSD. This is not an error; don't fight it (the frontend formats from the returnedcurrency).Imagery is opt-in (
SEED.md§ "Entity images"). Seed text-only by default — omitmediahere. When imagery is on, attach the image in the dedicated pass-2 Attach images step after the service exists.
Payment-options validation (rejecting combos return INVALID_PAYMENT_OPTIONS):
rateType | options.online | options.inPerson | Valid? |
|---|---|---|---|
| FIXED / VARIED | true | false / true | ✓ |
| FIXED / VARIED | false | true | ✓ |
| NO_FEE (free) | false | true | ✓ |
| NO_FEE (free) | true | — | ✗ — online is only for FIXED/VARIED |
| any | false | false | ✗ — at least one must be true |
A free service therefore omits fixed and uses "rateType": "NO_FEE", "options": { "online": false, "inPerson": true }.
⚠️ Reading the response — created services are under results[], each as results[].item with per-item results[].itemMetadata. A successful bulk create returns 200 with:
{ "results": [
{
"itemMetadata": { "id": "<serviceId>", "originalIndex": 0, "success": true },
"item": {
"id": "<serviceId>",
"name": "…",
"type": "APPOINTMENT",
"mainSlug": { "name": "<url-slug>", "custom": false },
"schedule": { "id": "<scheduleId>", "availabilityConstraints": { … } },
"payment": { … }
}
}
], "bulkActionMetadata": { "totalSuccesses": 1, "totalFailures": 0 } }(item is present only because you sent "returnEntity": true.) Keep each service's item.id, item.mainSlug.name (the frontend links by slug — if absent, derive it from the name: lowercase, non-alphanumerics → hyphens, dedupe), and — for CLASS — item.schedule.id (needed for STEP 4). Check itemMetadata.success per item (false populates itemMetadata.error); retry only the failed services once with the exact same format — do not loop, and don't re-create the ones that already succeeded.
Service modeling judgment (the what still comes from the request, but model it correctly):
APPOINTMENT = a customer picks a time (1-on-1: consults, haircuts, treatments). Availability comes from staff working hours — no extra step.
CLASS = a recurring group session many customers book (yoga, workshops). Needs
defaultCapacityand scheduled sessions (STEP 4) or its calendar is permanently empty.COURSE is out of scope for a basic seed (it requires booking + calendar events + whole-course enrollment) — use CLASS for group offerings unless the request explicitly needs fixed multi-session courses.
STEP 4: Schedule sessions for CLASS services (CLASS only — skip for APPOINTMENT)
Creating a CLASS service does not create any bookable sessions; the frontend lists sessions via eventTimeSlots, which returns scheduled session events. A freshly created CLASS has none — its calendar is a dead end until you add sessions. Sessions are Calendar Events V3, created from each CLASS's returned schedule.id. Create all sessions across all classes in a single bulk call to POST https://www.wixapis.com/calendar/v3/bulk/events/create (a few upcoming sessions per class, e.g. 3 over the next ~2 weeks):
{
"events": [
{
"event": {
"scheduleId": "<item.schedule.id of a CLASS FROM STEP 3>",
"type": "CLASS",
"start": { "localDate": "<FUTURE_DATE>T09:00:00" },
"end": { "localDate": "<FUTURE_DATE>T10:00:00" },
"resources": [ { "id": "<RESOURCE_ID_FROM_STEP_1>", "permissionRole": "WRITER" } ],
"totalCapacity": 12
}
}
]
}⚠️ CRITICAL: each element of events MUST be wrapped in { "event": { … } } — a bare event object is rejected. Other requirements:
resourcesmust be non-empty for a CLASS event (a session with no resource is rejected), andresources[].permissionRolemust be"WRITER"(or"COMMENTER") — omitting it defaults toUNKNOWN_ROLE→400 "resources.permissionRole must not be UNKNOWN_ROLE". Use the sameresourceIdfrom STEP 1.start/enduse{ "localDate": "YYYY-MM-DDThh:mm:ss" }— local time, noZ(seconds ignored). Use today-or-future dates.One bulk call can mix sessions for different classes — each event carries its own
scheduleId. The response is the standard bulk shape (results[]with per-itemitemMetadata.success+ abulkActionMetadatatally); retry only failed events once.For a recurring weekly schedule instead of one-off sessions, add
event.recurrenceRule({ "frequency": "WEEKLY", "interval": 1, "days": ["MONDAY"], "until": { "localDate": "…" } }) — onlyWEEKLYand a single day per rule are supported. One-off sessions are simpler and sufficient for a seed.totalCapacitydefaults to the schedule'sdefaultCapacityif omitted; set it explicitly to the class size.
Keep each session's event id — it's results[].itemMetadata.id (the events bulk sends no returnEntity, so there is no item in its response, only itemMetadata) — under seeded.services[].sessionEventIds if the frontend will deep-link. If STEP 4 is skipped or fails, record a notes entry so it's surfaced: "CLASS sessions not scheduled — add session times in the Bookings dashboard before sign-up works."
Attach images (imagery ON only — skip otherwise)
Only when imagery is on (SEED.md § "Entity images"). This is the bookings entry in the required pass-2 "attach the image to the entity" flow — the service was created text-only in STEP 3; now write the image onto it. Obtain the image per references/IMAGE_GENERATION.md (generate + import, or import an existing URL) → keep file.url and its file.id, then patch the service.
The image is written under media.mainMedia and media.coverMedia, each { "image": { "id", "url", "width", "height" } }. Per the Services V2 reference (references/bookings/create-and-update-booking-services.md): media.mainMedia is shown in the services list, media.coverMedia on the service page, and media.items[] is the service-page gallery. The binding field is the image id (the Wix Media file id); url and dimensions are descriptive. Write shape:
{
"service": {
"id": "<serviceId>",
"revision": "<current revision>",
"media": {
"mainMedia": { "image": { "id": "<file.id>", "url": "<file.url>", "width": 1024, "height": 1024 } },
"coverMedia": { "image": { "id": "<file.id>", "url": "<file.url>", "width": 1024, "height": 1024 } }
}
}
}# GET the service first for its current revision (a stale/omitted revision → conflict):
curl -X PATCH 'https://www.wixapis.com/bookings/v2/services/<serviceId>' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{ "service": { "id": "<serviceId>", "revision": "<current revision>", "media": { "mainMedia": { "image": { "id": "<file.id>", "url": "<file.url>", "width": 1024, "height": 1024 } }, "coverMedia": { "image": { "id": "<file.id>", "url": "<file.url>", "width": 1024, "height": 1024 } } } } }'Fetch the current
revisionfirst (GET https://www.wixapis.com/bookings/v2/services/<serviceId>, or reuse theitem.revisionfrom STEP 3'sreturnEntityresponse) and echo it back — a services V2 update is revision-checked.⚠️ Writing the image under
media.image(animageobject directly undermedia) returnsHTTP 200but silently drops it — therevisionincrements and no image lands. Because the failure is a silent200, not a400, a successful status code is not on its own proof the image attached: confirm by re-querying the service (GET …/bookings/v2/services/<serviceId>) and checkingmedia.mainMediais populated.Never block on image failure (
SEED.md§ "Entity images" / IMAGE_GENERATION "Credits, cost & the not-generating fallback") — on failure, skip and leave the service text-only.
Conclusion
Following these steps in order sets up a new Services V2 Wix Bookings site:
Every service is assigned a
category.idso it appears on the live site (the visibility invariant) — a fresh install has no categories, so at least one is created (extra named categories only when the request wants a filter).Every APPOINTMENT carries a non-empty
staffMemberIdsof staffresourceIdvalues (the default Business-Owner resource when no staff are named), so it isn't rejected withMISSING_APPOINTMENT_RESOURCES.Services use the correct flat Services V2 shape on the public host, with
onlineBooking.enabled,defaultCapacity, a validpayment.optionscombo, andsessionDurationsfor appointments.Every CLASS has scheduled Calendar Events V3 sessions, so its calendar is bookable rather than empty.
When imagery is on, each service's image is attached by the Attach images step (pass-2) via
PATCH …/services/{id}undermedia.mainMedia/media.coverMedia(each{ image: { id, url, width, height } }), revision-checked and confirmed with a follow-up query — writing undermedia.imagereturns200but silently drops the image; on failure the service stays text-only.IDs kept for the coding handoff:
serviceIds[], serviceslugs (mainSlug.name), staffresourceIds, category ids, and CLASSsessionEventIds.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Wix
- Publisher
- Wix (Official)
- Source
- wix/skills · skills/wix-headless · commit d168bc2
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Wix or Wix.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wix-headless.zip