weaverse-content-api
Installation
SKILL.md
Weaverse Content API
Read and edit Weaverse content (projects, pages, theme settings, translations) outside the Studio editor, over an authenticated REST API. Use it for bulk edits, AI/automation content pipelines, staged draft→publish flows, and scheduled or versioned content changes.
- Base URL:
https://studio.weaverse.io/api/v1/content - Machine spec:
GET https://studio.weaverse.io/api/v1/content/openapi.json(OpenAPI 3.1, no auth) — the authoritative contract. Fetch it for exact field-level schemas; this skill is the workflow guide. - Full endpoint details:
references/endpoints.md. Rich-text/Portable Text details:references/portable-text.md. - Helper script:
scripts/weaverse_content_api.mjs(zero-dependency, Node 18+).
The one thing you must understand first
Not every write goes live. The API has three write models:
- Live edits —
PATCH .../pages/:type/*handle(item data),PATCH .../theme-settings, and translation writes apply immediately and invalidate caches, going live throughapi.weaverse.io— the same path a Studio save takes. - Staged writes + explicit promotion — page drafts (
GET/PUT/DELETE .../page-drafts/:pageId), global-section drafts (op=save-draft/discard-draft), and pending-version replacement (PUT /versions/{versionId}, CAS-fenced; drafts refused) don't change live by themselves. Promotion is a live write:POST /publish-versions/{versionId}(publish a saved draft),POST /versions/{versionId}/publish-now(publish a scheduled version immediately), orPOST /versions/{versionId}/restore(immediately overwrites live content — a confirm-gated rollback).POST /versions/{versionId}/scheduleis not inert either: it commits an automatic live change atpublishAtwith no further call — so aPUTreplacement of an already-scheduled version also goes live at that time. All of these needcontent:publish(restore alsocontent:delete). - Project lifecycle —
POST /projectswithop=create|copy|delete|set-settings|purge-cache(scopeproject:manage; delete also needscontent:delete+confirm). Projects can be created through the API — a blank or theme-seeded project, or a background copy of this shop's own or a public demo-store project.
So the lifecycle is: