**Version: 202701**

# Update theme file

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

  Theme's unique identifier

**application/json**

**Body | Example**

**Body (required)**

- `doc` object (required)

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

  - `type` string (required)

    The type of file: `layout`, `templates`, `sections`, `snippets`, `assets`, `config`, `locales`, `blocks`
  - `location` string (required)

    Location
  - `content` string (required)

    Content

```json
{
  "doc": {
    "type": "string",
    "location": "string",
    "content": "string"
  }
}
```

## 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": {}
}
```
