Skip to content

Delete Folder

DELETE
/api/v1/object/folders
curl --request DELETE \
--url 'https://example.com/api/v1/object/folders?prefix=example&bucket=example'

Only ever an empty folder — S3 has no bulk-delete-a-prefix primitive, and silently nuking everything under it would be a very different, far more dangerous action than what "delete this folder" implies. Deleting its contents first (individually, or via bulk delete) is the deliberate extra step for that.

prefix
required
Prefix
string
bucket
required
Bucket
string

Successful Response

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}