See Stacksync in action with a solution architect. Book a demo ↗
Folders

Folders

Delete an empty folder

DELETE
/v1/workspaces/{workspace_id}/folders/{folder_id}

A folder that still holds sub-folders or resources is refused with 409: move or delete them first. Answers the deleted folder. With validate_only, the same checks run and 204 answers, nothing is deleted.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

folder_id*string

The folder.

Formatuuid

Query Parameters

region*Regions

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Value in"besg""usnv"
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response

A folder of the workspace

folder_id*Folder Id
folder_name*Folder Name
folder_resource_id*Folder Resource Id
parent_folder_id*|

The folder it is in; None at the root

region*Regions
Value in"besg""usnv"
Delete an empty folder
curl -X DELETE 'https://api.stacksync.com/v1/workspaces/0/folders/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg'
{  "folder_id": "<folder_id>",  "folder_name": "<folder_name>",  "folder_resource_id": "<folder_resource_id>",  "parent_folder_id": "<parent_folder_id>",  "region": "besg"}