Skip to main content
POST
Create a database

Authorizations

Authorization
string
header
required

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

Path Parameters

workspaceSlug
string
required

Body

application/json

The name and region for the new database

Parameters for creating a new database, including the name and region.

databaseName
string
required

The name of the database to be created. Database names must be less than 64 characters, and unique within a workspace. Names may contain letters (lower or uppercase), numbers, and underscores, and must begin with a letter or underscore.

Example:

"my_spectacular_db"

region
enum<string>
required

The region where the database will be hosted. Nile currently supports the following values:

  • AWS_US_WEST_2 - AWS in US West (Oregon)
  • AWS_EU_CENTRAL_1 - AWS in Europe (Frankfurt)
Available options:
AWS_US_WEST_2,
AWS_EU_CENTRAL_1
Example:

"AWS_US_WEST_2"

sharded
enum<boolean>

Whether to create a sharded database or just regular Postgres. Sharded databases are a good fit for scalable multi-tenant applications and vector use, while regular Postgres is suitable for most applications.

Available options:
true,
false
Example:

true

Response

Database created.

id
string
required
name
string
required
Minimum string length: 1
workspace
object
required
status
enum<string>
required
Available options:
PENDING,
REQUESTED,
BUILT,
READY
region
enum<string>
required
Available options:
AWS_US_WEST_2,
AWS_EU_CENTRAL_1,
AZURE_EASTUS
expandable
boolean
required
apiHost
string<uri>
required
created
string<date-time>
deleted
string<date-time>
dbHost
string<uri>
sharded
boolean