> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openinary.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Move File or Folder

> Move a file or folder into a different parent folder

Moves one file or folder into another folder. There is no bulk endpoint, so call it once per item.

```
POST /storage/{path}/move
```

```bash theme={null}
curl -X POST https://cdn.openinary.dev/storage/photos/portrait.jpg/move \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"destination": "archive"}'
```

**Auth:** API Key required

## Parameters

| Param | In | Type | Required | Description |
| - | - | - | - | - |
| `path` | path | string | yes | Path to the file or folder relative to the storage root, e.g. `photos/portrait.jpg`. Use the `path` from [List Storage](https://docs.openinary.dev/api-reference/storage/list.md). |
| `destination` | body | string | no | Destination folder, relative to the storage root, e.g. `photos/2024`. Omit or leave empty to move to the root. |

## Response

```json theme={null}
{
  "success": true,
  "path": "archive/portrait.jpg"
}
```

| Field | Type | Description |
| - | - | - |
| `success` | boolean | `true` if the move succeeded |
| `path` | string | The new full path of the file or folder |

**Status codes:** `200` success · `400` already in that folder · `404` not found · `500` error

## Related

> [card] [Copy File](https://docs.openinary.dev/api-reference/storage/copy.md)
>
> Duplicate a file into a different folder.

> [card] [List Folders](https://docs.openinary.dev/api-reference/storage/folders.md)
>
> Get every folder path, useful for building a "Move to" picker.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.