## Set the main photo `PUT https://getkollek.com/api/items/{item}/photos/{photo}/main` Promote a photo to be the main visual of its item. The previous main photo is demoted. **Permissions:** Owners and editors. Viewers get a 404 response. ### Path parameters - `item` (integer, required): The ID of the item the photo belongs to. - `photo` (integer, required): The ID of the photo. **Returns:** The updated item photo object. ### Example request ```bash curl https://getkollek.com/api/items/1/photos/2/main \ -X PUT \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" ``` ### Example response `Status: 200` ```json { "data": { "type": "item_photo", "id": "2", "attributes": { "item_id": "1", "filename": "cover.jpg", "mime_type": "image/jpeg", "size": 204800, "is_main": true, "position": 2, "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/items/1/photos/2" } } } ```