# Update Device File Alias Update an existing device file alias. **Endpoint**: `PUT /api/devices/:id/file-aliases/:aliasId` **Auth**: Required **Content-Type**: `application/json` ## Path Parameters | Parameter | Type | Required | Description | | --------- | ------------- | -------- | --------------- | | id | string (UUID) | Yes | Device UUID | | aliasId | string (UUID) | Yes | File alias UUID | ## Request Body | Field | Type | Required | Description | | --------- | ------ | -------- | ------------- | | file_name | string | No | New file name | | file_hash | string | No | New file hash | ### Example Request ```json { "file_name": "updated-book.epub", "file_hash": "newhash123..." } ``` ## Response (200 OK) ```json { "id": "uuid", "device_id": "device-uuid", "media_item_id": "book-uuid", "file_name": "updated-book.epub", "file_hash": "newhash123...", "updated_at": "2026-02-08T11:00:00Z" } ``` ## Error Responses | Code | Description | | ---- | ------------------------------ | | 400 | Invalid request data | | 401 | Invalid or expired token | | 404 | Device or file alias not found |