Content API
The Weaverse Content API is a REST API that lets you read and update your page content, theme settings, and project data from any application — headless frontends, mobile apps, static site generators, AI agents, or custom integrations.Write endpoints cover page content (update + delete), theme settings, and the
project name. Content changes use the same cache-invalidation path as a
Studio save. Project create/delete and store-level settings remain
Studio-only.
Base URL
Endpoints
The separate public discovery API exposes
GET /api/public/v1/projects/:projectId/custom-pages for custom-page route metadata. It does not require a Content API key and does not filter assignments by publication state.
All write endpoints also accept POST with the same body, for clients and
proxies that strip PATCH/DELETE bodies. Full request/response schemas live
in /openapi.json.
Write semantics
- Page update —
PATCH .../pages/:type/:handle...with{ "items": [{ "id", "data", "type?", "children?" }], "locale?" }.datais shallow-merged over the item’s existing data (send only changed top-level keys; nested objects are replaced wholesale). Unknown ids are created only whentypeis supplied. Max 100 items per request. - Page create —
POST .../pageswith{ "type", "handle", "name?", "locale?", "basedOn?", "shopifyResourceId?" }. Creatable types areCUSTOM,PRODUCT,COLLECTION,PAGE,BLOG,ARTICLE.CUSTOMcreates a bespoke page with a blank root item (or clonesbasedOn). A resource-backed type creates a per-resource override that clones the project’s shared default template for that type when one exists (otherwise blank), or clonesbasedOn. This creates one new page per call (a per-resource copy). A duplicate live assignment returns409and mutates nothing. - Assign template resources —
POST .../template-assignments/:pageIdwith{ "assignments": [{ "handle", "shopifyResourceId?", "locale?" }] }. Assigns many resources to one shared template page without creating page copies. All-or-nothing: a handle already on this page is an idempotent no-op, but if any handle belongs to a different live page the whole request returns409and writes nothing (never repointed). - Page delete —
DELETE .../pageswith{ "pageIds": [...] }or{ "handles": [...], "type", "locale?" }. Accepts up to 500 target values. When both selector arrays are present,pageIdstakes precedence. - Theme settings —
PATCH .../theme-settingswith{ "theme": { ... } }. Top-level keys are shallow-merged over the project’s own theme. For a real change, Weaverse attempts a deduplicated snapshot of the merged result, but snapshot failure is non-fatal and does not stop the settings write. - Project —
PATCH /projects/:projectIdwith{ "name": "..." }. Onlynameis writable; unknown fields are rejected.
Response formats
Page and theme-settings endpoints support two output formats. The default is unchanged — existing integrations are unaffected.
When both the query parameter and the
Accept header are present, the query parameter wins. See Get Page › Portable Text format for the full mapping rules and a rendering example.
Authentication
All endpoints (except/openapi.json) require a Content API key. Pass it via the Authorization header:
Obtaining an API key
Content API keys are provisioned per shop. Generate one from the Weaverse Dashboard → Settings.Scoping
Each API key is scoped to a single Weaverse shop. Requests can only access projects that belong to that shop. Attempting to access another shop’s project returns a403 Forbidden error.
Pagination
List endpoints (/projects and /pages) use cursor-based pagination.
Paginated response shape
nextCursorisnullwhen there are no more results.- Pass
nextCursoras theafterparameter to fetch the next page.
Example: iterating through pages
Error handling
All errors follow a consistent envelope:Error codes
Usage tracking & billing
Every authenticated API request counts toward your plan’s usage quota. API hits share the same billing pool as storefront page views:- 1 API request = 1 page view hit
- Usage is tracked per project and appears in your billing dashboard
- Tracking is non-blocking — it never slows down API responses
- The
/openapi.jsonendpoint is public and not tracked
Quick start
1
Get your API key
Obtain a Content API key from your Weaverse Studio dashboard.
2
List your projects
3
Fetch page content
4
Render in your app
Use the returned
items array to render page sections in any frontend framework.TypeScript example
Next steps
List Projects
Retrieve all projects in your shop
List Pages
Browse page assignments in a project
Get Page Content
Fetch full page data with component items
Get Theme Settings
Retrieve theme design tokens and configuration