**Version: 202601**

# Rename theme file

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

Renames an existing 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 rename, containing its type and the current and new location

  - `type` string (required)

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

    Location
  - `new_location` string

    New location

```json
{
  "doc": {
    "type": "string",
    "location": "string",
    "new_location": "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": {}
}
```
