# Soft delete a file

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

## `DELETE /media/:id`

**Soft delete a file**

Moves a file to trash. The file remains accessible via its CDN URL
for 30 days. Use `POST /media/{id}/restore` to recover it.

Required permissions: `media.delete`

### Parameters

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


### Responses

| Status | Description |
| --- | --- |
| `204` | Deleted (no body) |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `404` | Not found |


### Examples

```bash
curl -X DELETE https://api.lynkow.com/v1/media/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "message": "File moved to trash"
}
```

---