How to create a Pages template using Shopify API

Topic summary

Main issue: Apps that create Pages via REST need to generate a custom theme template file (sent as template_suffix) before Page creation. With Asset API PUT/DELETE deprecating, developers ask for the new way to create templates, and whether theme app extensions can handle this.

Status update: One report (June 2024) says PUT still works to duplicate a template, but POST returns 404. Multiple developers indicate they’re blocked or following.

Proposed solution: Use the Admin GraphQL mutation themeFilesUpsert (2024-10) to create theme files, including templates. A link to Shopify docs is provided.

Outcome: A participant confirms the 2024-10 Admin GraphQL approach works, suggesting themeFilesUpsert is the practical replacement for Asset API writes for templates.

Open points: No explicit confirmation about using theme app extensions alone for template file creation; the consensus steers toward Admin GraphQL themeFilesUpsert as the path forward.

Summarized with AI on December 16. AI used: gpt-5.

Well, you can create templates using “themeFilesUpsert” mutation in Graphql. More Info

1 Like