---
title: "Move a file or directory"
method: POST
path: "/v1/orgs/{slug}/volumes/{id}/files/rename"
tags: ["volumes"]
---

# Move a file or directory

`POST /v1/orgs/{slug}/volumes/{id}/files/rename`

## Request

- Base URL: `https://api.microsandbox.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.microsandbox.dev/v1/orgs/{slug}/volumes/{id}/files/rename`
- Auth: HTTP bearer

## Path parameters

- `slug` string, required
- `id` string, uuid, required

## Request body

- FileMoveRequest
  - `from` string, required
  - `to` string, required

## Response `200`

Move a file or directory

- VolumeFileMutationResponse: Confirmation that a filesystem change succeeded.
  - `ok` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Volume or path not found
- `502`: Volume filesystem unavailable

## Changes

- **2026-10-30** `1cdd89b0fe30`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/microsandbox/apis/microsandbox-api/changes/v1/orgs/:slug/volumes/:id/files/rename/post.md)

---

[API](https://skmtc.dev/microsandbox/apis/microsandbox-api.md) - [All operations](https://skmtc.dev/microsandbox/apis/microsandbox-api/llms.txt) - [OpenAPI document](https://skmtc.dev/microsandbox/apis/microsandbox-api/revisions/1cdd89b0fe30?raw)
