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
array
boolean
boolean
integer
array
enum
boolean
boolean
Status
Content type
201
application/json

Bucket

Name
Type
Description
string
string
string
arrayof string
boolean
string
boolean
integer
arrayof string
string
boolean
boolean
C#
using Appwrite;
using Appwrite.Enums;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Storage storage = new Storage(client);
Bucket result = await storage.CreateBucket(
bucketId: "<BUCKET_ID>",
name: "<NAME>",
permissions: ["read("any")"], // optional
fileSecurity: false, // optional
enabled: false, // optional
maximumFileSize: 1, // optional
allowedFileExtensions: new List<string>(), // optional
compression: .None, // optional
encryption: false, // optional
antivirus: false // optional
);