Skip to content

CMS Page — Create

Creates a new CMS page. Equivalent to POST /api/admin/cms/pages.

Operation

OperationType
createAdminCmsPageMutation

Input

GraphQL input fields are camelCase.

FieldTypeRequiredNotes
urlKeyString!yesUnique slug (lowercase, hyphen-separated). Serves the page at /page/{urlKey}.
pageTitleString!yes
htmlContentString!yesPage body (HTML).
channels[Int!]!yesNon-empty list of channel IDs the page is published to.
metaTitleStringno
metaKeywordsStringno
metaDescriptionStringno

Broadcast to every locale

Create takes flat top-level fields and broadcasts them to every configured locale — the new page starts with the same pageTitle / htmlContent / urlKey / SEO values in each language. Translate individual languages afterwards with Update (which is locale-nested).

Response

The mutation returns the created page. All scalars resolve, and translations / channels are field-selectable connections ({ edges { node { … } } }) — translations carries one entry per configured locale (the broadcast content). Select only what you need.

Errors

ConditionResult
urlKey, pageTitle, or htmlContent missingvalidation error
urlKey not a valid slug, or already in usevalidation error
channels empty or contains an unknown IDvalidation error
Admin role lacks cms.createpermission error

Released under the MIT License.