Requires Any of write_content, write_online_store_pages access scopes.

Creates a page.


The properties of the new page.


Was this section helpful?

The page that was created.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation pageCreate($page: PageCreateInput!) {
  pageCreate(page: $page) {
    page {
      # Page fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "page": {
    "body": "<your-body>",
    "handle": "<your-handle>",
    "isPublished": true,
    "metafields": [
      {
        "description": "<your-description>",
        "id": "gid://shopify/<objectName>/10079785100",
        "key": "<your-key>",
        "namespace": "<your-namespace>",
        "type": "<your-type>",
        "value": "<your-value>"
      }
    ],
    "publishDate": "2019-09-07T15:50:00Z",
    "templateSuffix": "<your-templateSuffix>",
    "title": "<your-title>"
  }
}
input PageCreateInput {
  body: String
  handle: String
  isPublished: Boolean
  metafields: [MetafieldInput!]
  publishDate: DateTime
  templateSuffix: String
  title: String!
}

input MetafieldInput {
  description: String
  id: ID
  key: String
  namespace: String
  type: String
  value: String
}