Skip to main content
POST
/
storage
/
v4
/
object_storages
/
{storage_id}
/
buckets
Create bucket
curl --request POST \
  --url https://api.gcore.com/storage/v4/object_storages/{storage_id}/buckets \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my-new-bucket"
}
'
{
  "cors": {
    "allowed_origins": [
      "https://example.com",
      "*"
    ]
  },
  "lifecycle": {
    "expiration_days": 30
  },
  "name": "my-bucket",
  "policy": {
    "is_public": true
  },
  "storage_id": 123
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

storage_id
integer<int64>
required

Storage ID

Body

application/json
name
string
required

Name of the bucket to create

Example:

"my-new-bucket"

Response

BucketCreateEndpointResV4

cors
BucketCORSV4 CORS settings controlling which web domains can access objects in this bucket from a browser. · object
required
lifecycle
BucketLifecycleV4 Automatic object expiration rule. Objects are permanently deleted after the specified number of days. · object
required
name
string
required

Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.

Example:

"my-bucket"

policy
BucketPolicyV4 Access policy controlling whether objects in this bucket can be read without authentication. · object
required
storage_id
integer<int64>
required

Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.

Example:

123