---
search:
  tags:
    - Themes
    - POST
seo:
  description: >-
    Moves a public/ file, or every file under a public/ folder (subfolders…
    Reference for the POST /themes/{theme_id}/files/move endpoint in the Bolder
    API v2.
sidebar:
  label: Move or rename theme files
  badge: POST
title: Move or rename theme files
type: openapi-operation
---
Moves a `public/` file, or every file under a `public/` folder (subfolders included), in one step.
Editable files keep their version history; uploaded files keep their content. Refused (`422`) when
the target path is taken, when a folder would move into itself, or for paths outside `public/`.
URLs follow the new path.

`POST /themes/{theme_id}/files/move`

**Request body** (`application/json`, required)

- `from` (string, required)
- `to` (string, required)

Request body example:

```json
{
  "from": "public/img",
  "to": "public/images"
}
```

**Responses**

- `200` — The files moved
- `401` — Unauthorized
- `403` — Access denied
- `422` — The target is taken, the source doesn't exist, or the paths are not in public/

Response example, 200:

```json
{
  "files": [
    {
      "from": "public/img/logo.png",
      "to": "public/images/logo.png",
      "id": "string",
      "stored_as": "template"
    }
  ]
}
```
