Is it’s possible to create a custom page handle/url (eg. https://myshopifystore.com/pages/my-page) when creating a Shopify page through the REST API?
Topic summary
A user asked whether it’s possible to programmatically set a custom page handle/URL when creating a Shopify page through the API.
Resolution:
- The Shopify Admin REST API’s Page resource supports this functionality
- The
/pages.jsonendpoint accepts ahandleproperty in POST requests - This property allows developers to define the page URL path (e.g.,
/pages/my-page)
Outcome:
- The original poster confirmed they found the solution in the API documentation after posting the question
- Reference documentation: Shopify Admin REST API Page resource (2024-01)
https://www.google.com/search?q=shopify+api+online+store+page
The dev docs
https://shopify.dev/docs/api/admin-rest/2023-10/resources/page
1 Like
Hi MBO1,
Our docs on the Page resource show an example of making a POST request to the pages.json endpoint, where you have access to the handle property that you can use to define what the page URL will be.
Hope this helps!
1 Like
Thank you, I found it eventually in the docs after I asked the question ![]()