SocialKit
APIMedia

Delete a media folder

Delete a media folder and either keep its files and subfolders or delete them with it.

By default only the folder goes. The files and subfolders inside it move up to the folder's parent (or to the top level when the folder had none). Send delete_media: true to delete the files in the folder and in all its subfolders as well. Deleted files leave the posts that use them, as in Delete media files, and the subfolders are deleted too.

Request

  • Method: DELETE
  • URL: https://app.socialk.it/core/api/<workspaceUuid>/media/folders/<folderUuid>
  • Authorization: Bearer <personal-key>
  • Content-Type: application/json
  • Roles: Admin, Member (see Permissions)

Path parameters

ParameterTypeDescription
workspaceUuidstringUUID of the workspace.
folderUuidstringUUID of the folder.

Body

{
  "delete_media": false
}
FieldTypeRequiredDescription
delete_mediabooleanNotrue deletes the files of the folder and of its subfolders. Default false: the contents move up.

Example

curl -X DELETE 'https://app.socialk.it/core/api/<workspaceUuid>/media/folders/<folderUuid>' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <personal-key>' \
  -H 'Content-Type: application/json' \
  -d '{"delete_media": false}'

Response

{
  "success": true
}

A 404 with an empty message means no folder of this workspace has that UUID. A 404 with Workspace not found. means the workspace UUID is wrong.

On this page