Skip to main content

pageEditorCreateVersion

Saves a new unpublished version of a page and returns its UUID with thumbnail upload details. Publish it with publishVersion; use pageEditorUpdateVersion to change a saved version. Requires a page editor token for the editor, or a logged-in user who owns the editor or can edit the page's site.

Page editor

This operation serves the Crazy Egg page editor. Besides personal access tokens, it accepts the page editor's own credential, and it checks access to the editor, page or site involved.

pageEditorCreateVersion(
pageId: String!
patch: String!
segment: String
name: String
): PageEditorUpdateVersionResponse!

Arguments​

pageEditorCreateVersion.pageId ● String! non-null scalar​

Page UUID from pageEditorCreatePage or pageEditorGetEditor.

pageEditorCreateVersion.patch ● String! non-null scalar​

JSON-encoded string, stored without validation, in the A/B test editorPatch format of the ab-test-variant-patches skill: a default array of one-change transforms plus optional style and script. Example: {"default":[{"target":"h1","text":"New headline","finalSelectors":["h1"]}]}

pageEditorCreateVersion.segment ● String scalar​

JSON-encoded audience definition in the audienceDefinitionContract format, stored without validation; omit to store null. Example: {"version":1,"operator":"and","conditions":[]}

pageEditorCreateVersion.name ● String scalar​

Optional version name; omit to store null.

Type​

PageEditorUpdateVersionResponse object​

Version UUID and thumbnail details from pageEditorCreateVersion and pageEditorUpdateVersion.