# Move files to a folder

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

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

**Move files to a folder**

Moves one or more media files to a target folder. Provide an array
of media IDs and the target folder ID (or `null` for root).

Required permissions: `media.update`

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mediaIds` | string[] | Yes | Required. 1-100 characters. Array of strings |
| `folderId` | string \| null | Yes | Required. Media folder UUID |


### Responses

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


### Examples

```bash
curl -X POST https://api.lynkow.com/v1/media-folders/move-media \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mediaIds": ["uuid1", "uuid2"], "folderId": "target-folder-uuid"}'
```

### Response Example

```json
{
  "moved": 2
}
```

---