Projects
Run a project lifecycle operation
Shop-scoped project lifecycle. The body's op field selects the operation:
- create: creates a project in the caller's shop. name is required (1-100 characters). Set config.themeName to seed it from a theme; omit it or pass blank for a blank project with generated storefront pages. If the theme seed fails, a blank project is created instead and the response carries a warning. Returns 201 with object: "project_created".
- copy: clones sourceProjectId into the caller's shop. The source must be this shop's own project or a public demo-store project; any other shop's project returns 404. The clone runs in the background: the response is 202 with object: "project_copy_started" and the targetProjectId. Observe completion by listing the target project's pages. name defaults to Copy of <source name>.
- delete: soft-deletes projectId (a backup is taken first) and purges its caches. confirm must equal the projectId, otherwise 400. A project that still has variant (child) projects returns 409 CONFLICT (HAS_VARIANTS). Returns 200 with object: "project_deleted".
- set-settings: revision-fenced write of non-secret settings (name, defaultLocale). Pass the project's current revision (from GET /projects/{projectId}) as expectedUpdatedAt; if the project changed since, the request returns 409 STALE_PROJECT and writes nothing. defaultLocale is the full Hydrogen i18n object Studio stores (label, language, country, pathPrefix). Returns 200 with object: "project_settings_updated" and the new projectRevision.
- purge-cache: the Studio "Clear cache" action. Invalidates the project's caches without touching content. Returns 200 with object: "cache_purged".
Every operation other than create and copy must target a live project owned by the caller's shop; otherwise 404.
Required scope: project:manage (delete also requires content:delete)
post/projects
Request
- Base URLhttps://studio.weaverse.io/api/v1/content
- AuthHTTP bearer
Request body
Response
Operation result
object required
Changes
No recorded changes to this operation across all 1 revision of this API.