Skip to content

Create Database

POST
/dbaas/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "orders-db",
"engine": "postgresql",
"engine_version": "16",
"sku_item_price_id": 2301,
"disk_size": 100,
"admin_username": "appadmin",
"admin_password": "<password>",
"pgvector_enabled": true,
"extensions": [
"pg_trgm"
],
"ip_allowlist": [
{
"cidr": "203.0.113.0/24",
"label": "office VPN"
},
"198.51.100.7"
],
"vpc_id": 17,
"deletion_protection": false
}'

Creates a PostgreSQL database with one node and starts setting it up. The call returns at once with the database in Creating; poll Get Database Provisioning or Get Database until status is Running. The admin login is created with the username and password you send; no call returns the password later. The pg_stat_statements extension is always installed. Needs the Create permission on DBaaS.

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
name
required

Name of the database, up to 50 characters: lowercase letters, digits and hyphens, starting and ending with a letter or digit. Unique in the project.

string
<= 50 characters /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/

Example

orders-db
engine
required
string
Allowed values: postgresql

Example

postgresql
engine_version
required

A version that List Database Versions returns.

string
<= 10 characters

Example

16
sku_item_price_id
required

The plan: a sku_item_price_id from SKU List with service=dbaas. It sets the vCPUs and memory.

integer

Example

2301
disk_size
required

Disk size in GB, 20 to 2,000.

integer
>= 20 <= 2000

Example

100
admin_username
required

The admin login: starts with a lowercase letter, then lowercase letters, digits and underscores, up to 63 characters. Names the platform reserves and names starting with pg_ are refused. No call changes it later.

string
<= 63 characters /^[a-z][a-z0-9_]{0,62}$/

Example

appadmin
admin_password
required

12 to 64 characters with at least one uppercase letter, one lowercase letter, one digit and one symbol.

string format: password
>= 12 characters <= 64 characters

Example

<password>
pgvector_enabled

Install the vector extension. Default true.

boolean
default: true

Example

true
extensions

More extensions to install, from List Database Extensions.

Array<string>
Allowed values: pg_stat_statements vector pg_trgm uuid-ossp pgcrypto hstore citext btree_gin btree_gist ltree unaccent

Example

[
"pg_trgm"
]
ip_allowlist

IPv4 ranges allowed to reach the public endpoint. Each entry is an IPv4 address or CIDR range, as a string or as an object with cidr and an optional label. A bare address becomes a /32 range, host bits are cleared (10.0.0.5/24 becomes 10.0.0.0/24), and a repeated range is kept once. Up to 50 entries. 0.0.0.0/0 allows any address. Without an allowlist the database gets no public endpoint and is reached only through its VPC.

Array
One of:
string

Example

[
{
"cidr": "203.0.113.0/24",
"label": "office VPN"
},
"198.51.100.7"
]
vpc_id

A VPC in the project, in Active state.

integer
nullable

Example

17
deletion_protection

Refuse every delete of this database. The API has no call that turns it off later. Default false.

boolean

Example

false

Creation started; the database is Creating

Media typeapplication/json
object
code
integer
message
string
data
object
id
integer
name
string
engine
string
Allowed values: postgresql
engine_version
string
status

Creating while the database is being set up, started or restarted, Running, Scaling while the disk grows, Degraded when the database is serving but its health could not be fully confirmed (Stop and Restart are also accepted from it), Stopped, Failed when the launch did not finish or a storage resize did not complete, and Terminating while it is deleted.

string
Allowed values: Creating Running Scaling Degraded Stopped Failed Terminating
cpu

VCPUs, set by the plan.

string
nullable
memory

Memory, set by the plan.

string
nullable
disk_size

Disk size in GB.

integer
nullable
endpoint_url

Public read-write address and port. null until the database first reaches Running, and while it has no IP allowlist.

string
nullable
public_ip
string
nullable
private_ip
string
nullable
deletion_protection

true when the database cannot be deleted.

boolean
parameter_group_id

The attached parameter group.

integer
nullable
created_by
object
id
integer
name
string
email
string
username
string
created_at
string
updated_at
string
sku_details

The plan: its specification under specs and its pricing under plan. null when the plan is gone.

object
ip_allowlist

IPv4 ranges allowed to reach the public endpoint.

Array<object>
object
cidr
string
label

Description of the range; empty when none was given.

string
location
string
vpc_id
integer
nullable
vpc

The VPC attachment. null when no VPC is attached.

object
id
integer
vpc_name
string
subnet_name
string
resource_type
string
resource_name
string
object_id
integer
ip_address

The database’s address in the VPC.

string
nullable
status
string
attached_at
string
nullable
created_at
string
vpc_private_ip

The database’s VPC address; null without a VPC.

string
nullable
pgvector_enabled

true when the vector extension was chosen at creation.

boolean
nullable
extensions

Extensions set at creation.

Array<string>
errors
object

Example

{
"code": 201,
"message": "Created Successfully",
"data": {
"id": 123,
"name": "orders-db",
"engine": "postgresql",
"engine_version": "16",
"status": "Creating",
"cpu": "4",
"memory": "16Gi",
"disk_size": 100,
"endpoint_url": "<host>:5432",
"public_ip": "203.0.113.25",
"private_ip": "10.0.4.17",
"deletion_protection": false,
"parameter_group_id": null,
"created_by": {
"id": 501,
"name": "Example User",
"email": "user@example.com",
"username": "user@example.com"
},
"created_at": "2026-10-21T11:17:29Z",
"updated_at": "2026-10-21T11:31:05Z",
"ip_allowlist": [
{
"cidr": "203.0.113.0/24",
"label": "office VPN"
}
],
"location": "Chennai",
"vpc_id": null,
"vpc": {
"id": 41,
"vpc_name": "app-vpc",
"subnet_name": "app-subnet",
"resource_type": "Database",
"resource_name": "orders-db",
"object_id": 123,
"ip_address": "10.10.0.12",
"status": "Attached",
"attached_at": "2026-10-21T11:20:02Z",
"created_at": "2026-10-21T11:17:29Z"
},
"vpc_private_ip": null,
"pgvector_enabled": true,
"extensions": [
"pg_stat_statements",
"vector"
]
},
"errors": {}
}

A field is not valid; errors is keyed by field. The messages include “Database name should contain lowercase letters, digits, and hyphens only.”, “A database with the same name already exists in the Project.”, “Database Name can contain a maximum of 50 characters”, “‘postgresql ’ is not an available version. Call GET versions/ for the current list.”, “Disk size not allowed less than 20.”, “Disk size not allowed greater than 2000.”, “Username must start with a lowercase letter, contain only lowercase letters, digits and underscores, and be 1-63 characters.”, “‘’ is a reserved system username.”, “Password must be 12-64 characters and include at least one uppercase letter, one lowercase letter, one digit and one symbol.”, “Extension ‘’ is not available for postgresql.”, “VPC not found in this project.” and “VPC must be Active (current: ).”, besides allowlist errors as in Update Database IP Allowlist. A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.

Media typeapplication/json
object
code
integer
message
string
data
object
errors

Keyed by field.

object

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": {
"name": [
"A database with the same name already exists in the Project."
]
}
}

The caller lacks the permission the call needs on the project, or the region is not allowed.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 403,
"message": "Forbidden",
"data": {},
"errors": "You don't have permission to access this service. Please verify your policy or project."
}

The plan is missing or is not an active database plan in the account’s currency (“SKU_ITEM_PRICE is either invalid or not provided”); there is not enough capacity (“Inventory temporarily unavailable. Please try again after some time.”) or credit (“Insufficient Credits! …”); or the launch could not start (“Managed Database creation failed”). Nothing is created.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Inventory temporarily unavailable. Please try again after some time."
}