Docs
Skip to content
post

Create database

Endpoint

posthttps://<REGION>.cloud.appwrite.io/v1/databases

Description

Required scopes

databases.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
boolean
Status
Content type
201
application/json

Database

Name
Type
Description
string
string
string
string
boolean
legacy | tablesdb | documentsdb | vectorsdb
DatabaseStatus
arrayof backup

Object type

arrayof Archive

Object type

Go
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/v5/client"
"github.com/appwrite/sdk-for-go/v5/databases"
)
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
client.WithProject("<YOUR_PROJECT_ID>")
client.WithKey("<YOUR_API_KEY>")
)
service := databases.New(client)
response, error := service.Create(
"<DATABASE_ID>",
"<NAME>",
databases.WithCreateEnabled(false),
)