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
- application/json
- Body
- Example
Bodyrequired
typestring
The type of file to delete: layout, templates, sections, snippets, assets, config, locales, blocks. Defaults to assets
Default value:
assetslocationstring
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.jsjson
{
"type": "assets",
"location": "a.js"
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
codestring
error code
messagestring
error message
data object
object
json
{
"code": "string",
"message": "string",
"data": {}
}