Requires Any of write_content, write_online_store_pages access scopes.

Updates a page.


Anchor to id
id
required

The ID of the page to be updated.

The properties of the page to be updated.


Was this section helpful?

The page that was updated.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation pageUpdate($id: ID!, $page: PageUpdateInput!) {
  pageUpdate(id: $id, page: $page) {
    page {
      # Page fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "id": "gid://shopify/<objectName>/10079785100",
  "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",
    "redirectNewHandle": true,
    "templateSuffix": "<your-templateSuffix>",
    "title": "<your-title>"
  }
}
input PageUpdateInput {
  body: String
  handle: String
  isPublished: Boolean
  metafields: [MetafieldInput!]
  publishDate: DateTime
  redirectNewHandle: Boolean
  templateSuffix: String
  title: String
}

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