Skip to main content
Version: 202601

Create theme file

POST 

/openapi/2026-01/themes/:theme_id/doc

Creates a new file within the specified theme.

Request​

Path Parameters

    theme_id stringrequired

    Theme's unique identifier

Bodyrequired

    doc objectrequired

    The file to create, containing its type, location, and content

    typestringrequired

    The type of file: layout, templates, sections, snippets, assets, config, locales, blocks

    locationstringrequired

    Location

    contentstring

    Content. Defaults to empty which creates an empty file

Responses​

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    object