Edit title, caption and keywords
Set the title, caption or keywords of one or more photos.
PATCH https://cotlet.dev/api/v1/smugmug/photo-details
write
Applies the same values to every photo in photo_ids and returns the previous caption of each, so a mistake is one call away from undone. It does not send anything to other people, so it needs no confirmation. On a public gallery the new text is visible to visitors and to search. Filenames cannot be edited.
Parameters
| Name | Type | Description |
|---|---|---|
| photo_ids array required | array | Photo IDs from list_gallery_photos. |
| title string | string | New title for every photo in photo_ids. |
| caption string | string | Caption text, up to 65,000 characters. |
| caption_mode string | string | How to treat an existing caption: 'replace' (default), 'before' or 'after'. |
| keywords_add array | array | Keywords to add. Existing keywords stay. |
| keywords_remove array | array | Keywords to remove from these photos only. |
Request
curl -X PATCH https://cotlet.dev/api/v1/smugmug/photo-details \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"photo_ids":["Qm7xKd","Rt2nWc"],"caption":"Lakeview 10K, finish line.","caption_mode":"after","keywords_add":["running","lakeview","finish line"]}' result = client.call("smugmug", "update_photo_details", {"photo_ids":["Qm7xKd","Rt2nWc"],"caption":"Lakeview 10K, finish line.","caption_mode":"after","keywords_add":["running","lakeview","finish line"]}) const result = await cotlet.call('smugmug', 'update_photo_details', {"photo_ids":["Qm7xKd","Rt2nWc"],"caption":"Lakeview 10K, finish line.","caption_mode":"after","keywords_add":["running","lakeview","finish line"]}); cotlet call smugmug update_photo_details --data '{"photo_ids":["Qm7xKd","Rt2nWc"],"caption":"Lakeview 10K, finish line.","caption_mode":"after","keywords_add":["running","lakeview","finish line"]}' Example response
{
"updated": 2,
"photos": [
{
"photo_id": "Qm7xKd",
"filename": "DSC_3025.jpg",
"caption": "Lakeview 10K, finish line.",
"keywords": [
"running",
"lakeview",
"finish line"
],
"previous_caption": ""
},
{
"photo_id": "Rt2nWc",
"filename": "DSC_3026.jpg",
"caption": "First dance Lakeview 10K, finish line.",
"keywords": [
"wedding",
"running",
"lakeview",
"finish line"
],
"previous_caption": "First dance"
}
]
}