**Version: 202601**

# Delete theme file

**DELETE** `/openapi/2026-01/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` string (required)

  Theme's unique identifier

**application/json**

**Body | Example**

**Body (required)**

- `type` string

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

  **Default value:** `assets`
- `location` string

  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`

```json
{
  "type": "assets",
  "location": "a.js"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `` object

```json
{
  "code": "string",
  "message": "string",
  "data": {}
}
```
