**Version: 202601**

# Create theme file

**POST** `/openapi/2026-01/themes/:theme_id/doc`

Creates a new file within the specified theme.

## Request

**Path Parameters**

- `theme_id` string (required)

  Theme's unique identifier

**application/json**

**Body | Example**

**Body (required)**

- `doc` object (required)

  The file to create, containing its type, location, and content

  - `type` string (required)

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

    Location
  - `content` string

    Content. Defaults to empty which creates an empty file

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