POST
/
databases
Create a new database
curl --request POST \
  --url https://api.sevalla.com/v2/databases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "company_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  "location": "us-central1",
  "resource_type": "db1",
  "display_name": "test-db",
  "db_name": "test-db",
  "db_password": "example-password",
  "db_user": "example-user",
  "type": "postgresql",
  "version": "15"
}'
{
  "database": {
    "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
company_id
string
required
Example:

"54fb80af-576c-4fdc-ba4f-b596c83f15a1"

location
string
required

the location (data center) where the database will be created

Example:

"us-central1"

resource_type
enum<string>
required

the resource type (database size) to be created

Available options:
db1,
db2,
db3,
db4,
db5,
db6,
db7,
db8,
db9
Example:

"db1"

display_name
string
required
Example:

"test-db"

db_name
string
required
Example:

"test-db"

db_password
string
required
Example:

"example-password"

type
enum<string>
required
Available options:
postgresql,
redis,
mariadb,
mysql
Example:

"postgresql"

version
string
required
Example:

"15"

db_user
string

Only optional for Redis. Required for all other types.

Example:

"example-user"

Response

Response object of create database request

database
object
required