Delete bucket
Updated at:2025-11-03
API description
This API facilitates the deletion of a bucket. Prior to deletion, ensure all objects and incomplete three-step upload parts within the bucket are removed; otherwise, the deletion will fail.
Notes
- Before deleting a bucket, ensure it does not have cross-region replication enabled and is not the source or target bucket in any CRR rules; otherwise, the deletion will fail.
- Only the bucket owner has the authority to delete the corresponding bucket. Otherwise, a 403 Forbidden error will occur, accompanied by the error message "AccessDenied."
- To protect user data and prevent inadvertent deletions, BOS prohibits the deletion of non-empty buckets. If a bucket contains objects, a 409 Conflict error will be issued with the error code "BucketNotEmpty."
Online debugging
Request URI
DELETE /v1/{bucketName}
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Name of bucket to be deleted | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1DELETE /v1/bucketName_example
2 <Common request headers>
3{ }
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
