Skip to main content
Version: 202506

Delete theme file

DELETE 

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

Delete a specific theme file by theme ID, file type, and file location. assets/theme.css and layout/theme.layout cannot be deleted. Deleting a card file that is still used on a page does not fail; that card simply stops showing on the page.

Request

Path Parameters

    theme_id stringrequired

    Theme's unique identifier

Bodyrequired

    typestring

    The type of file to delete: layout, templates, sections, snippets, assets, config, locales, blocks. Defaults to assets

    Default value: assets
    locationstring

    The location of the file within the theme. Always pass it explicitly: when omitted the request falls back to assets/a.js and deletes that file

    Default value: a.js

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    object