Docs
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
Python
from appwrite.client import Client
from appwrite.services.storage import Storage
client = Client()
(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 = Storage(client)
result = storage.create_bucket('[BUCKET_ID]', '[NAME]', 'file')