Skip to main content
POST
/
databases
Create database
curl --request POST \
  --url https://api.sevalla.com/v2/databases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location": "europe-west1",
  "resource_type": "db-standard-1",
  "display_name": "My Database",
  "db_name": "mydb",
  "db_password": "securepassword123",
  "type": "postgresql",
  "version": "16",
  "db_user": "dbuser"
}
'
{
  "database": {
    "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Body

application/json
location
string
required

Cluster location identifier

Example:

"europe-west1"

resource_type
string
required

Resource type name

Example:

"db-standard-1"

display_name
string
required

Display name for the database

Required string length: 2 - 64
Example:

"My Database"

db_name
string
required

Database name

Required string length: 2 - 100
Example:

"mydb"

db_password
string
required

Database password

Required string length: 4 - 100
Example:

"securepassword123"

type
enum<string>
required

Database engine type

Available options:
postgresql,
mariadb,
mysql,
mongodb,
redis,
valkey
Example:

"postgresql"

version
string
required

Database engine version

Example:

"16"

db_user
string

Database user (required for non-Redis/Valkey)

Example:

"dbuser"

Response

Default Response

database
object
required