**版本：202601**

# 重命名主题文件

**PUT** `/openapi/2026-01/themes/:theme_id/doc-rename`

重命名指定主题中的现有文件。

## 请求

**Path参数**

- `theme_id` string (required)

  主题 ID

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `doc` object (required)

  要重命名的文件，包含文件类型、当前路径和新路径

  - `type` string (required)

    文件类型：`layout`、`templates`、`sections`、`snippets`、`assets`、`config`、`locales`
  - `location` string

    位置信息
  - `new_location` string

    新位置

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

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `` object

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