# Move a folder

**Publié le** : 2026-05-08
**Catégorie** : Media & Files

## `POST /media-folders/:id/move`

**Move a folder**

Moves a folder to a different parent folder (or to root with `parentId: null`).

Required permissions: `media.update`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Unique identifier |


### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `parentId` | string \| null | Yes | Required. Parent resource ID |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `404` | Not found |
| `422` | Validation error |


### Examples

```bash
curl -X POST https://api.lynkow.com/v1/media-folders/f3c4d5e6-f7a8-9012-cdef-234567890123/move \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"parentId": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"}'
```

### Response Example

```json
{
  "data": {
    "id": "f3c4d5e6-f7a8-9012-cdef-234567890123",
    "name": "Thumbnails",
    "parentId": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "mediaCount": 42,
    "createdAt": "2025-02-01T14:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}
```

---