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
string
Status
Content type
201
application/json

Database

Name
Type
Description
string
string
string
string
string
boolean
DatabaseType
DatabaseStatus
string
string
integer
string
string
string
arrayof backup

Object type

arrayof Archive

Object type

GraphQL
mutation {
databasesCreate(
databaseId: "<DATABASE_ID>",
name: "<NAME>",
enabled: false,
description: "<DESCRIPTION>"
) {
_id
name
description
_createdAt
_updatedAt
enabled
type
status
engine
specification
replicas
error
containerStatus
lifecycleState
policies {
_id
name
_createdAt
_updatedAt
services
resources
resourceId
resourceType
retention
schedule
type
enabled
}
archives {
_id
_createdAt
_updatedAt
policyId
size
status
startedAt
migrationId
services
resources
resourceId
resourceType
}
}
}