Change gallery privacy
Set the visibility and access of a gallery or folder.
PUT https://cotlet.dev/api/v1/smugmug/galleries/{gallery_id}/privacy
write Confirm
Changes who can open the gallery and returns how many galleries changed. Unlisted hides a gallery from navigation and search but anyone with the link can open it. A Private folder makes everything inside it Private. Updating direct image URLs stops every direct link shared before and cannot be undone. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| gallery_id string required | string | Gallery or folder ID from list_galleries. |
| visibility string | string | One of 'public', 'unlisted' or 'private'. |
| access string | string | One of 'password' or 'people_i_choose'. For people_i_choose, add people with invite_gallery_viewers. |
| password string | string | Gallery password. Required with access password. |
| password_hint string | string | Hint shown to visitors. |
| include_galleries_inside boolean | boolean | For a folder: apply the setting to every gallery inside it, at any depth. Default false. |
| update_direct_image_urls boolean | boolean | When switching to private: invalidate direct image links shared before. Irreversible. Default false. |
Request
curl -X PUT https://cotlet.dev/api/v1/smugmug/galleries/Xk4RtP/privacy \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"visibility":"private"}' result = client.call("smugmug", "set_gallery_privacy", {"gallery_id":"Xk4RtP","visibility":"private"}) const result = await cotlet.call('smugmug', 'set_gallery_privacy', {"gallery_id":"Xk4RtP","visibility":"private"}); cotlet call smugmug set_gallery_privacy --data '{"gallery_id":"Xk4RtP","visibility":"private"}' Example response
{
"gallery_id": "Xk4RtP",
"title": "Smith wedding",
"visibility": "private",
"galleries_changed": 1,
"direct_image_urls_updated": false
}