Skip to content
post

Create bucket

Endpoint

posthttps://<REGION>.cloud.appwrite.io/v1/storage/buckets

Description

Required scopes

buckets.write

Authentication

Initialize the Appwrite client with setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.

Parameters

string
Required
string
Required
string
Required
array
array
boolean
integer
array
boolean
boolean
Status
Content type
201
application/json

Bucket

Name
Type
Description
string
integer
integer
arrayof string
arrayof string
string
string
boolean
integer
arrayof string
boolean
boolean
Ruby
require 'appwrite'
client = Appwrite::Client.new
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
storage = Appwrite::Storage.new(client)
response = storage.create_bucket(bucket_id: '[BUCKET_ID]', name: '[NAME]', permission: 'file')
puts response.inspect