Skip to main content
Version: 202506

Update theme file

PATCH 

/openapi/2025-06/themes/:theme_id/doc

Replace the whole content of the specified file. Changes to the default theme's files take effect on the storefront immediately; every change is recorded in the file's version history.

Request

Path Parameters

    theme_id stringrequired

    Theme's unique identifier

Bodyrequired

    doc objectrequired

    The file to update, containing its type, location, and new content

    typestringrequired

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

    locationstringrequired

    Location

    contentstringrequired

    Content

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    object