Create database
Provision a managed database in a project and environment using a supported engine and plan. Pass a paid planKey from list_plans: free databases aren't available yet, so a create without one can be refused. planNote in the response says which plan it got and why.
Request & response examples
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"}'const response = await fetch( "https://app.helicarrier.xyz/api/databases", { method: "POST", headers: { Authorization: `Bearer ${process.env.HELI_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "name": "postgres", "engine": "postgres", "projectSlug": "my-project", "environmentSlug": "staging", "planKey": "heli-db-s1" }) });const data = await response.json();if (!response.ok) { throw new Error(`HTTP ${response.status}: ${data.error}`);}// Inspect data; avoid logging secret responses.import osimport requests
response = requests.request( "POST", "https://app.helicarrier.xyz/api/databases", headers={ "Authorization": f"Bearer {os.environ['HELI_API_KEY']}" }, json={ "name": "postgres", "engine": "postgres", "projectSlug": "my-project", "environmentSlug": "staging", "planKey": "heli-db-s1" }, timeout=30,)response.raise_for_status()data = response.json()# Inspect data; avoid logging secret responses.{ "id": "svc_example", "name": "postgres", "slug": "my-app", "sourceType": "database", "status": "idle", "planKey": "heli-db-s1", "projectId": "prj_example", "environmentId": "env_example", "planNote": "postgres is on the paid plan heli-db-s1, not the free plan, because the account already has its 10 free services. Pass planKey to choose its plan yourself, or change it with set_plan."}Illustrative values · selected fields
Request body
namestringrequiredDatabase name.
enginestringrequiredEngine key (e.g. postgres, redis, mysql, mongo).
projectSlugstringoptionalTarget 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.
environmentSlugstringoptionalTarget 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.
planKeystringoptionalPaid plan key from list_plans (e.g. heli-db-s1). Free databases aren't available yet: if omitted, the create is refused while the account can have a free plan, else it uses the cheapest paid plan for the engine.
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.
idstringUnique identifier of this resource.
namestringHuman-readable resource name.
slugstringURL-safe resource identifier.
sourceTypestringSource used to build or run the service.
statusstringCurrent state of the resource or operation.
planKeystringPlan identifier from the plan catalog.
projectIdstringProject that owns the resource.
environmentIdstringEnvironment that contains the service.
planNotestringWhat the plan the new resource landed on means: on the free plan, how it sleeps and wakes and what the account has left; on a paid plan you did not name, why it is not free. Empty otherwise.
Errors
400Invalid parameters. Check the required fields, types, and resource configuration.
401The API key is missing, invalid, or revoked.
403The caller or key scope does not permit this operation.
404The resource does not exist or is not visible to this caller.
create_database
Required MCP arguments: name, engine. Send path, query, and body fields together as tool arguments.