Mutations
471 root mutations.
setAiArtifactCreate/replace a per-user AI client artifact (e.g. mockup HTML) keyed by (thread_key, name). Scoped to the caller's org+user.
deleteAiArtifactDelete a per-user AI client artifact.
restoreWorkspaceCheckpointRestore the whole workspace (theme + data) to a checkpoint: rolls the theme back AND inverse-undoes the run's data created after the checkpoint. Own org only.
createApiKeyrevokeApiKeycreateAudienceContactupdateAudienceContactsetAudienceSubscriptiondeleteAudienceContactimportAudienceContactsBulk upsert leads by email; optionally add them to a list. Returns imported count.
addAudienceContactTagsremoveAudienceContactTagsmergeAudienceContactsimportAudienceContactsCSVexportAudienceContactscreateAudienceListupdateAudienceListdeleteAudienceListaddAudienceListMembersremoveAudienceListMemberscreateAudienceSegmentupdateAudienceSegmentdeleteAudienceSegmentrecalculateAudienceSegmentcreateSuppressiondeleteSuppressioncreateCustomAttributeupdateCustomAttributedeleteCustomAttributecreateCampaignupdateCampaigndeleteCampaignsendCampaignLaunch the campaign immediately (draft|scheduled → sending).
scheduleCampaignSchedule the campaign for a future time. Use sendCampaign to launch now.
pauseCampaigncancelCampaigntestSendCampaignSend the campaign to up to 5 test addresses without affecting stats.
updateCartRecoverySettingssendCartRecoveryEmailassignProductToCategoryremoveProductFromCategorycreateProductupdateProductdeleteProducttoggleFavoriteProductassignProductToStoresremoveProductFromStoressetProductStoreVisibilityresetProductToGlobalupdateProductForStoreuploadProductImageuploadProductImagesdeleteProductImagesetPrimaryProductImagereorderProductImagesupdateProductImagereindexAllProductsStart an async full reindex of the active org's products into Elasticsearch. Returns immediately with a run row to poll; single-flight per org (a fresh in-progress run is returned as-is).
clearStorefrontCachePurge the active org's entire cached storefront (all pages) from the edge + data caches.
createProductReviewsubmitProductReviewPublic storefront submission. Anonymous OK. Status='pending' unless the store has auto_approve_reviews=true. Errors if accept_reviews=false.
approveProductReviewrejectProductReviewdeleteProductReviewcreateContentTypeupdateContentTypedeleteContentTypecreateContentRecordupdateContentRecorddeleteContentRecordsubmitContentRecordcreateCustomerupdateCustomerdeleteCustomeraddLoyaltyPointsredeemLoyaltyPointsrecordDebtPaymentRecord debt payment
increaseDebtIncrease customer debt (for manual adjustments)
createCustomerGroupupdateCustomerGroupdeleteCustomerGroupcreateRfmSegmentRuleCreate new RFM segment rule
updateRfmSegmentRuleUpdate existing RFM segment rule
deleteRfmSegmentRuleDelete RFM segment rule
toggleRfmSegmentRuleToggle active status of RFM segment rule
reorderRfmSegmentRulesReorder RFM segment rules by priority
createCustomerTierupdateCustomerTierdeleteCustomerTieraddToWishlistAdd a product to the current customer's or anon session's wishlist. Idempotent.
removeFromWishlistRemove a product. No-op if not present.
createAttributeupdateAttributedeleteAttributesetAttributeOptionSwatchUpsert a swatch row for an option. `type` must be one of visual_color | visual_image | text. `value` is interpreted accordingly (hex / URL / display string). `store_id=0` is the global default; pass a non-zero store_id for per-store overrides.
deleteAttributeOptionSwatchDelete a swatch row for an option (option_id + store_id pair). The option itself is preserved — only the swatch payload is removed, so the storefront falls back to plain label rendering.
createAttributeSetupdateAttributeSetdeleteAttributeSetassignAttributeToSetbulkAssignAttributesupsertEmailSenderdeleteEmailSendertestSenderSmtpSend a live test email through the sender's SMTP (or the process transport).
addEmailDomainRegister a sending domain (DKIM selector defaults to em1).
verifyEmailDomainRe-run SPF/DKIM/DMARC DNS lookups and persist the verification flags.
deleteEmailDomainenqueueTestEmailEnqueue a test email (pre-rendered HTML) through the real send pipeline.
addEmailSuppressionremoveEmailSuppressioncreateEmailTemplateupdateEmailTemplateduplicateEmailTemplatedeleteEmailTemplaterevertEmailTemplateToDefaultRestore a system template's content from its canonical default.
sendEmailTemplateTestRender + enqueue a test send of this template to an address (uses store default sender). When subject+html are both supplied the content is rendered raw (unsaved); otherwise the saved template is rendered. sampleData merges over the default {first_name, email} context.
storefrontEmailOpenOpen pixel — records an open from the encrypted token. Returns true.
storefrontEmailClickClick — records a click; returns the decoded redirect URL.
storefrontEmailUnsubscribeUnsubscribe — records the unsub, flips the lead, adds a suppression.
storefrontMarketingEventStorefront/custom marketing event collection (lead-attributed).
setMetricMappingAssign (or clear, with eventName=null) the event that fills a role for a store.
defineMetricRoleAdd a user-defined custom role (extends the standard set).
defineCustomEventRegister (or update, by name) a custom event in the catalog.
deleteCustomEventRemove a custom event definition.
autoMapMetricsAuto-map every unmapped role to its best suggestion (observed event / default).
defineConversionMetricDefine (or update by name) a custom conversion metric.
deleteConversionMetricDelete a conversion metric.
createPlanCreate a plan definition (platform admin).
updatePlanUpdate a plan definition (platform admin).
assignPlanAssign a plan to an org (platform admin).
setDefaultPlanMake a plan the global default auto-assigned to every new org (platform admin).
setAccountDefaultPlanOverride which plan the orgs THIS account creates get; null reverts to the global default (platform admin).
setAccountOrgLimitOverride how many shops (orgs) an account may create; null reverts to the default (platform admin).
setPlatformAdminGrant/revoke cross-org platform-admin on an account (platform admin).
setAccountStatusChange an account's status: active | inactive | suspended (platform admin).
setOrganizationStatusSuspend/reactivate a shop (org): active | suspended. Suspended shops serve a 'deactivated' page on their storefront (platform admin).
setOrganizationAiEnabledEnable/disable the AI chat editor for an org (platform admin). Effective only when the org's plan allows AI and the server has an AI key.
createProductFeedupdateProductFeeddeleteProductFeedgenerateProductFeedNowEnqueue an immediate generation; returns the new run to poll.
previewProductFeedRender a candidate config against a few sample products without writing a file.
createCashBookupdateCashBookdeleteCashBookcreateTransactiondeleteTransactioncreateFlowupdateFlowsetFlowStatusdeleteFlowrevertFlowToDefaultRestore a system flow's trigger + definition from its canonical default.
enrollContactTestManually enroll one contact for testing.
flowTestExecuteSynchronous debug run (sim send/render, cycle detection, 30s timeout).
recordFlowExecutionLogPersist a builder test run into the flow's execution history.
createFormupdateFormdeleteFormactivateFormpauseFormstorefrontSubmitFormPublic form submission — upserts a lead, adds to the target list, stores the submission. IP/UA/geo/utm are read server-side from request headers.
createSupplierupdateSupplierdeleteSuppliercreatePurchaseOrderupdatePurchaseOrderconfirmPurchaseOrderreceiveGoodscancelPurchaseOrdercreateStockTransferupdateStockTransferconfirmStockTransferreceiveStockTransfercancelStockTransfercreateStockAdjustmentupdateStockAdjustmentconfirmStockAdjustmentcancelStockAdjustmentadjustStockimportInventoryCSVreserveStockreleaseStockcreateInventoryDocumentupdateInventoryDocumentapproveInventoryDocumentcompleteInventoryDocumentcancelInventoryDocumentcreateGRNFromPurchaseOrdercreateWarehouseZoneupdateWarehouseZonedeleteWarehouseZonecreateCatalogRuleCreate a catalog price rule. Reindex runs async via the durable job queue.
updateCatalogRuleUpdate a catalog price rule. Reindex runs async.
deleteCatalogRuleDelete a catalog price rule. Stage-1 + stage-2 rows are cleaned up by the indexer.
triggerCatalogRuleReindexManually trigger a reindex. rule_id = null → full org reindex. Returns immediately.
createPromotionCreate a new promotion
updatePromotionUpdate a promotion
createSalesRuleCreate a new sales rule
updateSalesRuleUpdate a sales rule
deleteSalesRuleDelete a sales rule
duplicateSalesRuleDuplicate a sales rule
generateCouponsGenerate multiple coupons
createPrimaryCouponCreate a primary coupon
deleteCouponsDelete coupons
exportCouponsExport coupons to CSV
importCouponsImport coupons from CSV
recordProductBlockEventRecord a block impression or product click for analytics. Fire-and-forget; always returns true (never breaks the storefront).
recordProductViewRecord a storefront PDP view. Feeds the 'Also viewed' co-view affinity + recently-viewed signal. Fire-and-forget; always returns true.
createProductBlockupdateProductBlockdeleteProductBlockmarkNotificationReadmarkAllNotificationsReadaddCustomDomainremoveDomainverifyDomainsetPrimaryDomainupdateSubdomainsetSubdomainEnabledretryDomainVerificationuploadDomainSslCertificatesetDomainCloudflareFlexcreateOrganizationupdateOrganizationdeleteOrganizationcreateStoreupdateStoredeleteStoreupdateStoreModerationPatch the moderation block in a store's settings JSON (accepts/auto-approve for comments+reviews).
updateStoreBrandingPatch the branding block (logo + favicon) and SEO defaults on a store.
createWarehouseupdateWarehousedeleteWarehouseupdateOrganizationLoyaltySettingscreateAddressupdateAddressdeleteAddressupsertExchangeRateupdateStorePaymentMethodsUpdate payment method configuration for a store.
togglePaymentMethodEnable or disable a specific payment method for a store.
createPersonalizationTemplateupdatePersonalizationTemplatedeletePersonalizationTemplatecreatePersonalizationRuleupdatePersonalizationRuledeletePersonalizationRuleassignProductPersonalizationPin a manual template on a product (overrides any rule-sourced assignment).
clearProductPersonalizationRemove a manual pin; rules may then reclaim the product.
applyPersonalizationRulesRe-resolve every rule-sourced assignment for the org (async, progress-tracked).
storefrontUploadPersonalizationFileAnonymous storefront upload for an image/file personalization field. Validates the field's accept + max size server-side; returns a stored /storage URL to embed in the cart line options.
openShiftOpen cashier shift
closeShiftClose cashier shift
recordCashOperationRecord cash drawer operation
registerDeviceTokenunregisterDeviceTokencreateCreditMemomarkCreditMemoRefundedcancelCreditMemocreateInvoicemarkInvoicePaidcancelInvoiceplaceOrderconfirmOrderprocessOrdercompleteOrdercancelOrderreleasePreorderRelease a pre-order: reserve stock for held units + move it into fulfilment (admin 'Release now').
addOrderPaymentconfirmPaymentreorderaddOrderCommentdeleteOrderCommentaddToCartaddToGuestCartupdateCartItemremoveFromCartclearCartapplyVoucherremoveVouchersetShippingAddresssetBillingAddresssetPaymentMethodmergeGuestCartredeemPointscancelRedeemPointsholdOrderretrieveHeldOrderapplyManualDiscountremoveManualDiscountsetCustomerupdateCartNotesupdateItemNotessetShippingMethodsetShippingAddressInlinesetBillingAddressInlinecreateShipmentmarkShipmentShippedmarkShipmentDeliveredmarkShipmentFailedaddShipmentTrackingupdateStoreShippingCarriersUpdate shipping carrier configuration for a store.
toggleShippingCarrierEnable or disable a specific shipping carrier for a store.
createTaxClassupdateTaxClassdeleteTaxClasscreateTaxRateupdateTaxRatedeleteTaxRatecreateTaxRuleupdateTaxRuledeleteTaxRulesaveTaxConfigurationinitializeTaxSetupcreateTrackingDestinationupdateTrackingDestinationdeleteTrackingDestinationsendTestTrackingEventEnqueue a REAL test conversion to the destination's Conversions API; appears in the delivery log.
storefrontTrackEventStorefront CAPI beacon: forward a canonical event to server-side destinations (deduped by event_id).
loginregisterlogoutrefreshTokenswitchOrganizationcreateShopcreateUserupdateUserdeleteUseraddOrgMemberremoveOrgMemberassignRolesToUserassignStoresToUserassignWarehousesToUsergrantPermissionToUserdenyPermissionToUserchangePasswordresetPasswordcreateRoleupdateRoledeleteRolecloneRoleassignPermissionsToRolesyncPermissionsToRoleassignResourcePermissionrevokeResourcePermissionassignResourceRolerevokeResourceRolesyncResourcePermissionscreateWebhookupdateWebhookdeleteWebhookrotateWebhookSecretIssue a fresh signing secret (returned once).
sendTestWebhookPlay-demo: enqueue a REAL signed test delivery; appears in the delivery log.
previewWebhookPayloadPlay-demo: preview the signed request for an event WITHOUT sending it.
createBlogPostCreate a new blog post
updateBlogPostUpdate a blog post
deleteBlogPostDelete a blog post
publishBlogPostPublish a blog post immediately
scheduleBlogPostSchedule a blog post for future publication
unpublishBlogPostUnpublish a blog post (revert to draft)
createBlogCategoryCreate a new blog category
updateBlogCategoryUpdate a blog category
deleteBlogCategoryDelete a blog category
reorderBlogCategoriesReorder blog categories
createBlogTagCreate a new blog tag
updateBlogTagUpdate a blog tag
deleteBlogTagDelete a blog tag
createBlogCommentCreate a new blog comment
submitBlogCommentPublic storefront submission. Anonymous OK. Status = 'pending' unless the store has auto_approve_comments=true. Errors if accept_comments=false.
approveBlogCommentApprove a blog comment
rejectBlogCommentReject a blog comment (mark as spam)
deleteBlogCommentDelete a blog comment
bulkApproveBlogCommentsBulk approve comments
bulkRejectBlogCommentsBulk mark comments as spam
createCollectionCreate a new collection
updateCollectionUpdate an existing collection
deleteCollectionDelete a collection
addProductsToCollectionManually add products to a collection
removeProductsFromCollectionRemove products from a collection
updateCollectionProductPositionsUpdate product positions in a collection
refreshCollectionProductsRefresh collection products based on current conditions
uploadStoreMediaUpload a single media file to a store
uploadStoreMediaBatchUpload multiple media files to a store
updateStoreMediaUpdate media metadata
deleteStoreMediaDelete a single media item
bulkDeleteStoreMediaDelete multiple media items
uploadWebStoreImageUpload an image for webstore content (blog, collection, category)
deleteWebStoreImageDelete a webstore image by URL
uploadStoreFontUpload a custom font file (TTF, OTF, WOFF, WOFF2)
updateStoreFontUpdate font metadata
deleteStoreFontDelete a custom font
createMenuCreate a new menu
updateMenuUpdate a menu
deleteMenuDelete a menu
createMenuItemCreate a menu item
updateMenuItemUpdate a menu item
deleteMenuItemDelete a menu item
reorderMenuItemsReorder menu items (bulk update positions)
duplicateMenuDuplicate a menu
updateMenuStylesUpdate menu styles
updateMenuItemStyleUpdate menu item style override
bulkAddMenuItemsBulk add menu items from resources
createPageCreate a new page
updatePageUpdate an existing page
savePageSave page content (Craft.js JSON) - used by auto-save
deletePageDelete a page
publishPagePublish a page
unpublishPageUnpublish a page
schedulePagePublicationSchedule page publication
duplicatePageDuplicate a page
createDefaultPagesCreate default pages for a store
saveGlobalSectionSave a global section
toggleGlobalSectionToggle global section visibility
publishGlobalSectionPublish a global section (copy draft to published)
storefrontRegisterRegister a new customer account for a storefront
storefrontLoginLogin as a customer
storefrontLogoutLogout the current customer (revokes token)
storefrontAddToCartAdd a product to the storefront cart. Auto-creates a guest quote when none exists for this session_id.
storefrontUpdateCartItemUpdate a cart item quantity
storefrontRemoveFromCartRemove an item from guest cart
storefrontClearCartClear every line from the storefront cart (returns the now-empty quote).
storefrontAddAddressAdd a new entry to the authed customer's address book.
storefrontUpdateAddressPatch an existing saved address (ownership enforced by the resolver).
storefrontDeleteAddressSoft-delete a saved address. Returns success=false silently when the row isn't found / not owned.
storefrontSetDefaultAddressFlip the default shipping or billing flag onto the given address (clears the previous default of the same kind).
storefrontUpdateProfileUpdate the authed customer's own profile (name / phone / email). Mirrors updateCustomer but scoped to self — no admin perms needed.
storefrontChangePasswordChange the authed customer's password. Requires the current password.
storefrontRequestPasswordResetRequest a password reset link. Always returns success=true to prevent email enumeration.
storefrontConfirmPasswordResetConfirm a password reset using the token issued by storefrontRequestPasswordReset.
storefrontApplyVoucherApply voucher code to guest cart
storefrontRemoveVoucherRemove voucher from guest cart
storefrontSetShippingAddressSet shipping address on storefront cart
storefrontSetShippingMethodSet shipping method on storefront cart
storefrontSetPaymentMethodSet payment method on storefront cart
storefrontSetCustomerInfoSet customer contact info for guest checkout
storefrontSetCustomerNoteSet the customer-provided order note on the quote (gated by shop.allow_order_note)
storefrontPlaceOrderPlace order from storefront guest cart
storefrontRedeemPointsRedeem loyalty points on the cart for a discount. Requires a signed-in customer (Bearer token); the resolver links the customer to the quote. Validates min/balance/cap server-side. Points are only deducted when the order is placed.
storefrontCancelRedeemPointsCancel a pending loyalty-points redemption on the cart.
storefrontBeginStripeCheckoutPre-create order in pending_payment status + issue Stripe PaymentIntent.
storefrontConfirmStripeOrderConfirm a Stripe payment after Stripe.js redirects back with payment_intent succeeded. Server re-verifies status with Stripe then flips order to processing/paid. Idempotent.
storefrontBeginVnpayCheckoutPre-create order in pending_payment status + build a signed VNPay payment URL. return_url is where VNPay redirects the browser back (e.g. https://shop/checkout/vnpay-return).
storefrontConfirmVnpayOrderConfirm a VNPay payment from the return-url params. Server re-verifies the HMAC-SHA512 signature + amount (never trusts the client) then flips the order to processing/paid. Idempotent with the server IPN.
createThemeCreate a new custom theme
updateThemeUpdate an existing theme
updateThemeSettingsUpdate theme settings (colors, typography, etc.)
deleteThemeDelete a theme
duplicateThemeDuplicate a theme
activateThemeActivate a theme for a store
installPresetThemeInstall a template/preset design into a store as an unpublished draft (clone of the chosen template). Publish/activate it to switch the storefront.
exportThemeExport a theme to JSON
importThemeImport a theme from JSON
createThemeSectionCreate a section for a theme
updateThemeSectionUpdate a theme section
deleteThemeSectionDelete a theme section
deleteThemeAssetDelete a theme asset
upsertThemeFileCreate or replace a single theme file.
bulkUpsertThemeFilesBulk write a batch of theme files (used by editor save-all + seeder).
renameThemeFileRename a theme file.
deleteThemeFileDelete a theme file.
snapshotThemeVersionSnapshot the current state of a theme (creates a new version row).
rollbackThemeVersionRestore every file in the theme to a previous snapshot.
publishThemeSnapshot + flip the theme's published_files_version_id to point at the new snapshot. Optionally promote to 'main' (live).
customizeThemeOpen a theme for editing in the Customizer. If the theme is currently 'main', returns (or creates) a draft clone whose parent_theme_id points back at the main; if a draft already exists for this main it is returned unchanged so the merchant continues their in-progress edits.
publishDraftThemePromote a draft theme (role='unpublished' with parent_theme_id set) into the live 'main' slot for its store, demoting the previous main to 'unpublished' as a one-click backup. Snapshots the draft into theme_versions before swapping so the change is auditable + rollback-able.
createThemePreviewTokenIssue a short-lived preview token (auth required).
revokeThemePreviewTokenRevoke a preview token (called on logout / editor close).
upsertTranslationssaveStoreWidgetTemplateSave a store-level widget template override
saveThemeWidgetTemplateSave a theme-level widget template
resetStoreWidgetTemplateReset/delete a store-level widget template override
resetThemeWidgetTemplateReset/delete a theme-level widget template
validateWidgetTemplateValidate a Liquid template without saving
