</photos>\r
```\r
\r
+---\r
+### friendica/photoalbum/delete (POST,DELETE; AUTH)\r
+#### Parameters\r
+* album: name of the album to be deleted\r
+\r
+deletes all images with the specified album name, is not reversible -> ensure that client is asking user for being sure to do this\r
+\r
+#### Return values\r
+\r
+On success:\r
+* JSON return {"result":"deleted","message":"album 'xyz' with all containing photos has been deleted."}\r
+\r
+On error:\r
+* 403 FORBIDDEN: if not authenticated\r
+* 400 BADREQUEST: "no albumname specified", "album not available"\r
+* 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed"\r
+\r
+\r
+---\r
+### friendica/photoalbum/update (POST,PUT; AUTH)\r
+#### Parameters\r
+* album: name of the album to be updated\r
+* album_new: new name of the album\r
+\r
+changes the album name to album_new for all photos in album\r
+\r
+#### Return values\r
+\r
+On success:\r
+* JSON return {"result":"updated","message":"album 'abc' with all containing photos has been renamed to 'xyz'."}\r
+\r
+On error:\r
+* 403 FORBIDDEN: if not authenticated\r
+* 400 BADREQUEST: "no albumname specified", "no new albumname specified", "album not available"\r
+* 500 INTERNALSERVERERROR: "unknown error - updating in database failed"\r
+\r
+\r
+---\r
+### friendica/photo/create (POST; AUTH)\r
+### friendica/photo/update (POST; AUTH)\r
+#### Parameters\r
+* photo_id (optional): if specified the photo with this id will be updated\r
+* media (optional): image data as base64, only optional if photo_id is specified (new upload must have media)\r
+* desc (optional): description for the photo, updated when photo_id is specified\r
+* album: name of the album to be deleted (always necessary)\r
+* album_new (optional): can be used to change the album of a single photo if photo_id is specified\r
+* allow_cid/allow_gid/deny_cid/deny_gid (optional): on create: empty string or omitting = public photo, specify in format '<x><y><z>' for private photo; \r
+ on update: keys need to be present with empty values for setting a private photo now to public\r
+\r
+both calls point to one function for creating AND updating photos. Saves data for the scales 0-2 to database (see above for scale description). Call adds non-visible entries to items table to enable authenticated contacts to comment/like the photo. \r
+Client should pay attention to the fact that updated access rights are not transferred to the contacts. i.e. public photos remain publicly visible if they have been commented/liked before setting visibility back to a limited group. Or: previously limited photos remain limited even if changed to publicly visible. \r
+Currently it is best way to inform user that updating rights is not the best way, offer a solution to add photo as a new photo with the new rights. \r
+\r
+#### Return values\r
+\r
+On success:\r
+* new photo uploaded: JSON return with photo data (see friendica/photo)\r
+* photo updated - changed photo data: JSON return with photo data (see friendica/photo)\r
+* photo updated - changed info: JSON return {"result":"updated","message":"Image id 'xyz' has been updated."}\r
+* photo updated - nothing changed: JSON return {"result":"cancelled","message":"Nothing to update for image id 'xyz'."}\r
+\r
+On error:\r
+* 403 FORBIDDEN: if not authenticated\r
+* 400 BADREQUEST: "no albumname specified", "no media data submitted", "photo not available", "acl data invalid"\r
+* 500 INTERNALSERVERERROR: "image size exceeds PHP config settings, file was rejected by server", \r
+ "image size exceeds Friendica Config setting (uploaded size: x)", \r
+ "unable to process image data", \r
+ "image upload failed", \r
+ "unknown error - uploading photo failed, see Friendica log for more information", \r
+ "unknown error - update photo entry in database failed", \r
+ "unknown error - this error on uploading or updating a photo should never happen"\r
+\r
+\r
+---\r
+### friendica/photo/delete (DELETE; AUTH)\r
+#### Parameters\r
+* photo_id: id of the photo to be deleted\r
+\r
+deletes a single image with the specified id, is not reversible -> ensure that client is asking user for being sure to do this\r
+Sets item table entries for this photo to deleted = 1\r
+\r
+#### Return values\r
+\r
+On success:\r
+* JSON return {"result":"deleted","message":"photo with id 'xyz' has been deleted from server."}\r
+\r
+On error:\r
+* 403 FORBIDDEN: if not authenticated\r
+* 400 BADREQUEST: "no photo_id specified", "photo not available"\r
+* 500 INTERNALSERVERERROR: "unknown error on deleting photo", "problem with deleting items occurred"\r
+\r
+\r
+---\r
+### account/update_profile_image (POST; AUTH)\r
+#### Parameters\r
+* image: image data as base64 (Twitter has a limit of 700kb, Friendica allows more)\r
+* profile_id (optional): id of the profile for which the image should be used, default is changing the default profile\r
+\r
+uploads a new profile image (scales 4-6) to database, changes default or specified profile to the new photo\r
+\r
+#### Return values\r
+\r
+On success:\r
+* JSON return: returns the updated user details (see account/verify_credentials)\r
+\r
+On error:\r
+* 403 FORBIDDEN: if not authenticated\r
+* 400 BADREQUEST: "no media data submitted", "profile_id not available"\r
+* 500 INTERNALSERVERERROR: "image size exceeds PHP config settings, file was rejected by server", \r
+ "image size exceeds Friendica Config setting (uploaded size: x)", \r
+ "unable to process image data", \r
+ "image upload failed"\r
+\r
+\r
---\r
### friendica/direct_messages_setseen (GET; AUTH)\r
#### Parameters\r
* friendships/exists\r
* friendships/show\r
* account/update_profile_background_image\r
-* account/update_profile_image\r
* blocks/create\r
* blocks/destroy\r
\r
* account/update_delivery_device\r
* account/update_profile\r
* account/update_profile_background_image\r
-* account/update_profile_image\r
* blocks/list\r
* blocks/ids\r
* users/lookup\r