Update photo
Set a photo's title, description and tags.
PATCH https://cotlet.dev/api/v1/flickr/photos/{photo_id}
write
Changes the title, description and tags of one of your photos and leaves who can see it as it is. Set tags_mode to add to keep existing tags, or replace to swap them. update_photo runs without asking first: it reaches nobody new and is undone with one more call.
Parameters
| Name | Type | Description |
|---|---|---|
| photo_id string required | string | Photo ID from list_photos. |
| title string | string | New title. Leave out to keep the current one. |
| description string | string | New description. Leave out to keep the current one. |
| tags array | array | Tags as a list of strings. |
| tags_mode enum | enum | add or replace. Default: add. |
Request
curl -X PATCH https://cotlet.dev/api/v1/flickr/photos/53917620011 \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Lisbon tram 28 at dusk","description":"Tram 28 climbing Rua da Graça, shot from the stairs at golden hour.","tags":["lisbon","tram","dusk","street"],"tags_mode":"add"}' result = client.call("flickr", "update_photo", {"photo_id":"53917620011","title":"Lisbon tram 28 at dusk","description":"Tram 28 climbing Rua da Graça, shot from the stairs at golden hour.","tags":["lisbon","tram","dusk","street"],"tags_mode":"add"}) const result = await cotlet.call('flickr', 'update_photo', {"photo_id":"53917620011","title":"Lisbon tram 28 at dusk","description":"Tram 28 climbing Rua da Graça, shot from the stairs at golden hour.","tags":["lisbon","tram","dusk","street"],"tags_mode":"add"}); cotlet call flickr update_photo --data '{"photo_id":"53917620011","title":"Lisbon tram 28 at dusk","description":"Tram 28 climbing Rua da Graça, shot from the stairs at golden hour.","tags":["lisbon","tram","dusk","street"],"tags_mode":"add"}' Example response
{
"photo_id": "53917620011",
"title": "Lisbon tram 28 at dusk",
"description": "Tram 28 climbing Rua da Graça, shot from the stairs at golden hour.",
"tags": [
"lisbon",
"tram",
"dusk",
"street"
],
"privacy": "public",
"status": "updated"
}