Skip to main content
POST
/
api
/
storage
/
buckets
Create New Bucket
curl --request POST \
  --url https://api.example.com/api/storage/buckets \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "bucketName": "avatars",
  "isPublic": true
}
'
{
  "message": "Bucket created successfully",
  "bucket": "avatars"
}

Authorizations

x-api-key
string
header
required

Body

application/json
bucketName
string
required

Bucket name (alphanumeric, underscore, and hyphen only)

Example:

"avatars"

isPublic
boolean
default:true

Whether the bucket is publicly accessible

Example:

true

Response

Bucket created successfully

message
string
Example:

"Bucket created successfully"

bucketName
string
Example:

"avatars"