# Update media metadata

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

## `PUT /media/:id`

**Update media metadata**

Updates a file's metadata: alt text, description, title. Does not
modify the file itself — use `POST /media/{id}/replace` for that.

Required permissions: `media.update`

### Parameters

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


### 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 PUT https://api.lynkow.com/v1/media/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"alt": "Updated alt text", "title": "New title"}'
```

### Response Example

```json
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "filename": "hero-banner.jpg",
    "originalName": "hero-banner.jpg",
    "mimeType": "image/jpeg",
    "size": 245760,
    "width": 1920,
    "height": 1080,
    "alt": "Updated alt text",
    "title": "New title",
    "url": "https://cdn.lynkow.com/sites/abc123/hero-banner.jpg",
    "variants": {
      "thumbnail": "https://cdn.lynkow.com/sites/abc123/hero-banner.jpg?w=150",
      "card": "https://cdn.lynkow.com/sites/abc123/hero-banner.jpg?w=400",
      "content": "https://cdn.lynkow.com/sites/abc123/hero-banner.jpg?w=800",
      "medium": "https://cdn.lynkow.com/sites/abc123/hero-banner.jpg?w=1200"
    },
    "folderId": "folder-uuid",
    "createdAt": "2025-02-10T12:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}
```

---