**Version: 202201**

# Create Theme File

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

Creates a new file within the specified theme.

## Request

**Path Parameters**

- `theme_id` string (required)

  Theme's ID

**application/json**

**Body | Example**

**Body**

- `RAW_BODY` string

  **Default value:** `{"doc":{"type":"assets","location":"test.js","content":"update"}}`

```json
{
  "RAW_BODY": "{\"doc\":{\"type\":\"assets\",\"location\":\"test.js\",\"content\":\"update\"}}"
}
```

## Responses

**200 | 422**

200

**application/json**

No schema

422

**text/plain**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "文件已存在"
  ]
}
```

```shell
{
  "errors": [
    "文件已存在"
  ]
}
```
