Create a bucket
Updated at:2025-11-03
API description
This API is used to create a bucket. Each user is allowed to create up to 100 buckets. By default, the created bucket's permission is set to "private," meaning the bucket owner has FULL_CONTROL, while others have no permissions.
Notes
- If a user attempts to create more than 100 buckets, the server will return a 400 Bad Request error with the TooManyBuckets code.
- If the specified bucket already exists, regardless of its creator, a 409 Conflict error will be returned with the message BucketAlreadyExists.
- To create a bucket distributed across multiple AZs, the region must already support multi-AZ bucket creation. Currently, BOS supports only three regions: Beijing and Guangzhou, with other regions to be added in the future.
Online debugging
Request URI
PUT /v1/{bucketname}
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketname | String | Yes | Name of bucket | "bucketname_example" | Path |
Parameters of request body
Description of the data structure of request body fields
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| enableMultiAz | Boolean | No | Specify whether the bucket data should be distributed across multiple AZs for disaster recovery at the data center level. "True" creates a multi-AZ bucket, while the default "False" creates a single-zone bucket. | true |
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1PUT /v1/bucketname_example
2 <Common request headers>
3{
4 "enableMultiAz" : true
5}
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
