Skip to main content

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Page

Requires content access scope.

In addition to an online storefront, Shopify stores come with a tool for creating basic HTML web pages. Store owners can create any number of pages to hold static content, such as an About us page, a Contact us page, or a page with customer testimonials.

These web pages are represented by the Page resource, and their HTML content is contained in the value of the body_html property. The Page resource lets you retrieve, create, update, and delete web pages for a store.

Pages are meant to be used for long-term, static content that rarely changes. For creating content on a regular basis, use the Blog resource instead.

Was this section helpful?

Anchor to

The Page resource

Anchor to

Properties


author

The name of the person who created the page.


body_html

The text content of the page, complete with HTML markup.


created_at
read-only

The date and time (ISO 8601 format) when the page was created.


handle

A unique, human-friendly string for the page, generated automatically from its title. In themes, the Liquid templating language refers to a page by its handle.


id
read-only
->
id

The unique numeric identifier for the page.


metafield

Additional information attached to the Page object. It has the following properties:

Show metafield properties
  • key: An identifier for the metafield. (maximum: 30 characters)
  • namespace: A container for a set of metadata. Namespaces help distinguish between metadata created by different apps. (maximum: 20 characters)
  • value: The information to be stored as metadata.
  • type: The metafield's information type. Refer to the full list of types.
  • description (optional): Additional information about the metafield.

For more information on attaching metadata to Shopify resources, see the Metafield resource.


published_at

The date and time (ISO 8601 format) when the page was published. Returns null when the page is hidden.


shop_id
read-only
deprecated

The ID of the shop to which the page belongs.


template_suffix

The suffix of the template that is used to render the page. If the value is an empty string or null, then the default page template is used.


title

The title of the page.


updated_at
read-only

The date and time (ISO 8601 format) when the page was last updated.


admin_graphql_api_id
read-only
->
id

The GraphQL GID of the page.


Was this section helpful?
{}

The Page resource

{
"author": "Lydia",
"body_html": "Contact us at <a href='mailto:contact@example.com'>contact@example.com</a>.",
"created_at": "2008-07-15T20:00:00-04:00",
"handle": "contact-us",
"id": 131092082,
"metafield": {
"key": "new",
"value": "new value",
"type": "single_line_text_field",
"namespace": "global"
},
"published_at": "2014-07-16T20:00:00-04:00",
"shop_id": 548380009,
"template_suffix": "contact",
"title": "Contact us",
"updated_at": "2008-07-16T20:00:00-04:00",
"admin_graphql_api_id": "gid://shopify/OnlineStorePage/131092082"
}

Anchor to POST request, Creates a page
post
Creates a page

Creates a page

Anchor to Parameters of Creates a pageParameters


api_version
string
required

Was this section helpful?

Anchor to post-pages-examplesExamples

Create a page with HTML markup

Request body
page
Page resource
Show page properties
page.title:"Warranty information"

The title of the page.

page.body_html:"<h2>Warranty</h2>\n<p>Returns accepted if we receive items <strong>30 days after purchase</strong>.</p>"

The text content of the page, complete with HTML markup.

Create a page with a metafield

Request body
page
Page resource
Show page properties
page.title:"Warranty information"

The title of the page.

page.body_html:"<h2>Warranty</h2>\n<p>Returns accepted if we receive items <strong>30 days after purchase</strong>.</p>"

The text content of the page, complete with HTML markup.

Create an unpublished page

Request body
page
Page resource
Show page properties
page.title:"Warranty information"

The title of the page.

page.body_html:"<h2>Warranty</h2>\n<p>Returns accepted if we receive items <strong>30 days after purchase</strong>.</p>"

The text content of the page, complete with HTML markup.

Creating a page without a title fails and returns an error

Was this section helpful?
post

/admin/api/2025-07/pages.json

curl -d '{"page":{"title":"Warranty information","body_html":"<h2>Warranty</h2>\n<p>Returns accepted if we receive items <strong>30 days after purchase</strong>.</p>"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2025-07/pages.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 201 Created
{
"page": {
"id": 1025371370,
"title": "Warranty information",
"shop_id": 548380009,
"handle": "warranty-information",
"body_html": "<h2>Warranty</h2>\n<p>Returns accepted if we receive items <strong>30 days after purchase</strong>.</p>",
"author": "Shopify API",
"created_at": "2025-07-01T14:44:15-04:00",
"updated_at": "2025-07-01T14:44:15-04:00",
"published_at": "2025-07-01T14:44:15-04:00",
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/1025371370"
}
}

Retrieve a list of all pages. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.


api_version
string
required

created_at_max

Show pages created before date (format: 2014-04-25T16:15:47-04:00).


created_at_min

Show pages created after date (format: 2014-04-25T16:15:47-04:00).


fields

Show only certain fields, specified by a comma-separated list of field names.


handle

Retrieve a page with a given handle.


limit
≤ 250
default 50

The maximum number of results to show.


published_at_max

Show pages published before date (format: 2014-04-25T16:15:47-04:00).


published_at_min

Show pages published after date (format: 2014-04-25T16:15:47-04:00).


published_status
default any

Restrict results to pages with a given published status:

Show published_status properties
  • published: Show only published pages.

  • unpublished: Show only unpublished pages.

  • any: Show published and unpublished pages.


since_id

Restrict results to after the specified ID.


title

Retrieve pages with a given title.


updated_at_max

Show pages last updated before date (format: 2014-04-25T16:15:47-04:00).


updated_at_min

Show pages last updated after date (format: 2014-04-25T16:15:47-04:00).


Was this section helpful?

Get all pages for a shop

Retrieve a list of all pages after the specified ID

Query parameters
since_id=108828309

Restrict results to after the specified ID.

Was this section helpful?
get

/admin/api/2025-07/pages.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/pages.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"pages": [
{
"id": 108828309,
"title": "Sample Page",
"shop_id": 548380009,
"handle": "sample",
"body_html": "<p>this is a <strong>sample</strong> page.</p>",
"author": "Dennis",
"created_at": "2008-07-15T20:00:00-04:00",
"updated_at": "2008-07-16T20:00:00-04:00",
"published_at": null,
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/108828309"
},
{
"id": 169524623,
"title": "Store hours",
"shop_id": 548380009,
"handle": "store-hours",
"body_html": "<p>We never close.</p>",
"author": "Jobs",
"created_at": "2013-12-31T19:00:00-05:00",
"updated_at": "2013-12-31T19:00:00-05:00",
"published_at": "2014-02-01T19:00:00-05:00",
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/169524623"
},
{
"id": 322471,
"title": "Support",
"shop_id": 548380009,
"handle": "support",
"body_html": "<p>Come in store for support.</p>",
"author": "Dennis",
"created_at": "2009-07-15T20:00:00-04:00",
"updated_at": "2009-07-16T20:00:00-04:00",
"published_at": null,
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/322471"
},
{
"id": 131092082,
"title": "Terms of Services",
"shop_id": 548380009,
"handle": "tos",
"body_html": "<p>We make <strong>perfect</strong> stuff, we don't need a warranty.</p>",
"author": "Dennis",
"created_at": "2008-07-15T20:00:00-04:00",
"updated_at": "2008-07-16T20:00:00-04:00",
"published_at": "2008-07-15T20:00:00-04:00",
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/131092082"
}
]
}

Retrieves a single page by its ID.


api_version
string
required

page_id
string
required

fields

Show only certain fields, specified by a comma-separated list of field names.


Was this section helpful?

Retrieve a single page

Path parameters
page_id=131092082
string
required
Was this section helpful?
get

/admin/api/2025-07/pages/131092082.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/pages/131092082.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"page": {
"id": 131092082,
"title": "Terms of Services",
"shop_id": 548380009,
"handle": "tos",
"body_html": "<p>We make <strong>perfect</strong> stuff, we don't need a warranty.</p>",
"author": "Dennis",
"created_at": "2008-07-15T20:00:00-04:00",
"updated_at": "2008-07-16T20:00:00-04:00",
"published_at": "2008-07-15T20:00:00-04:00",
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/131092082"
}
}

Retrieves a page count.


api_version
string
required

created_at_max

Count pages created before date (format: 2014-04-25T16:15:47-04:00).


created_at_min

Count pages created after date (format: 2014-04-25T16:15:47-04:00).


published_at_max

Show pages published before date (format: 2014-04-25T16:15:47-04:00).


published_at_min

Show pages published after date (format: 2014-04-25T16:15:47-04:00).


published_status
default any

Count pages with a given published status:

Show published_status properties
  • published: Count published pages.

  • unpublished: Count unpublished pages.

  • any: Count published and unpublished pages.


title

Count pages with a given title.


updated_at_max

Count pages last updated before date (format: 2014-04-25T16:15:47-04:00).


updated_at_min

Count pages last updated after date (format: 2014-04-25T16:15:47-04:00).


Was this section helpful?

Retrieve a count of all pages

Was this section helpful?
get

/admin/api/2025-07/pages/count.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/pages/count.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"count": 4
}

Updates a page


api_version
string
required

page_id
string
required

Was this section helpful?

Add a metafield to a page

Path parameters
page_id=131092082
string
required
Request body
page
Page resource
Show page properties
page.id:131092082
read-only

The unique numeric identifier for the page.

Hide a published page

Path parameters
page_id=131092082
string
required
Request body
page
Page resource
Show page properties
page.id:131092082
read-only

The unique numeric identifier for the page.

Show a hidden page

Path parameters
page_id=131092082
string
required
Request body
page
Page resource
Show page properties
page.id:131092082
read-only

The unique numeric identifier for the page.

Update an existing page completely

Path parameters
page_id=131092082
string
required
Request body
page
Page resource
Show page properties
page.id:131092082
read-only

The unique numeric identifier for the page.

page.body_html:"<p>Returns accepted if we receive the items <strong>14 days</strong> after purchase.</p>"

The text content of the page, complete with HTML markup.

page.author:"Christopher Gorski"

The name of the person who created the page.

page.title:"New warranty"

The title of the page.

page.handle:"new-warranty"

A unique, human-friendly string for the page, generated automatically from its title. In themes, the Liquid templating language refers to a page by its handle.

Update the body HTML of an existing page

Path parameters
page_id=131092082
string
required
Request body
page
Page resource
Show page properties
page.id:131092082
read-only

The unique numeric identifier for the page.

page.body_html:"<p>Returns accepted if we receive the items 14 days after purchase.</p>"

The text content of the page, complete with HTML markup.

Was this section helpful?
put

/admin/api/2025-07/pages/131092082.json

curl -d '{"page":{"id":131092082,"metafields":[{"key":"new","value":"new value","type":"single_line_text_field","namespace":"global"}]}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2025-07/pages/131092082.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 200 OK
{
"page": {
"shop_id": 548380009,
"title": "Terms of Services",
"handle": "tos",
"body_html": "<p>We make <strong>perfect</strong> stuff, we don't need a warranty.</p>",
"id": 131092082,
"author": "Dennis",
"created_at": "2008-07-15T20:00:00-04:00",
"updated_at": "2008-07-16T20:00:00-04:00",
"published_at": "2008-07-15T20:00:00-04:00",
"template_suffix": null,
"admin_graphql_api_id": "gid://shopify/Page/131092082"
}
}

Deletes a page.


api_version
string
required

page_id
string
required

Was this section helpful?

Delete a page

Path parameters
page_id=131092082
string
required
Was this section helpful?
del

/admin/api/2025-07/pages/131092082.json

curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-07/pages/131092082.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{}