Skip to content
HelicarrierDevelopers

Create database

Provision a managed database in a project and environment using a supported engine and plan.

POST/api/databasesHTTPS
Request & response examples
Request exampleServer-side
curl --fail-with-body --request POST \
'https://app.helicarrier.xyz/api/databases' \
-H "Authorization: Bearer $HELI_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"name": "postgres",
"engine": "postgres",
"projectSlug": "my-project",
"environmentSlug": "staging",
"planKey": "heli-db-s1"
}'
Response example201
{
"id": "svc_example",
"name": "postgres",
"slug": "my-app",
"sourceType": "database",
"status": "idle",
"planKey": "heli-db-s1",
"projectId": "prj_example",
"environmentId": "env_example"
}

Illustrative values · selected fields

Authorization

An account key with access, or a project key with project:write. A service key cannot perform this operation.

Authorization: Bearer <key>Key setup

Request body

namestringrequired

Database name.

enginestringrequired

Engine key (e.g. postgres, redis, mysql, mongo).

projectSlugstringoptional

Target project slug. Set this explicitly for automation; project keys require their own project. An account key that omits it uses the default project, if one exists.

environmentSlugstringoptional

Target environment slug (e.g. dev, staging, production). Optional for a normal key — the project's default environment is used. REQUIRED when your API key is restricted to specific environments; call whoami to see whether yours is.

planKeystringoptional

Plan key from list_plans (e.g. heli-db-s1). Prefer passing this explicitly so the database runs on the intended plan; if omitted, the cheapest plan matching the engine is applied.

Response 201

Creates a billed database service. Engine keys and plan keys should come from the engine and plan catalog endpoints. Set the target project and environment explicitly for automation.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

idstring

Unique identifier of this resource.

namestring

Human-readable resource name.

slugstring

URL-safe resource identifier.

sourceTypestring

Source used to build or run the service.

statusstring

Current state of the resource or operation.

planKeystring

Plan identifier from the plan catalog.

projectIdstring

Project that owns the resource.

environmentIdstring

Environment that contains the service.

Errors

400

Invalid parameters. Check the required fields, types, and resource configuration.

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

404

The resource does not exist or is not visible to this caller.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

create_database

Required MCP arguments: name, engine. Send path, query, and body fields together as tool arguments.

Connect your agent