Skip to main content
POST
Add service

Authorizations

Authorization
string
header
required

Session access JWT or an API token (insta_<prefix>_<secret>).

Path Parameters

projectId
string<uuid>
required

Body

application/json
type
required
Available options:
postgres
name
string
required

lower-kebab: a-z, 0-9, hyphen

branch
string

target branch (default: project default branch)

region

region for postgres/compute/managed databases (see GET /regions); invalid for storage

Available options:
us-east
public
boolean

storage only — provision the bucket with anonymous public-read (default false)

image
string

compute only — container image to run at creation (e.g. nginx:1.27)

port
integer

compute only — port the image listens on (default 8080)

alwaysOn
boolean

compute only — idle mode at creation. Omitted: the platform default (INSTA_COMPUTE_ALWAYS_ON_DEFAULT; true on InstaCloud: machines never scale to zero). false = scale-to-zero: idle machines suspend and wake on request. All plans; billing is actual usage either way.

volumeMountPath
string

Compute only: container mount path chosen on attachment; defaults to /data. Requires volumeGib only when attaching. Existing path changes are staged until the next deploy.

volumeGib
integer

compute only — attach a persistent volume of this many whole Gi (attachable later too via PUT /services/:id/volume; the volume never detaches, but DELETE /services/:id/volume destroys it, data and all). Any plan may create up to the configured free volume cap (10Gi by default, env-overridable per deployment); a larger size is paid and capped at the org's own plan cap (50Gi on paid plans by default), like growing it later. Constraints: machineCount stays 1, and scale-to-zero uses stop (cold wake) instead of suspend — both lift if the volume is deleted.

Required range: x >= 1
source
object

Response

Default Response

service
object

A project-level service (postgres | storage | compute | redis | mysql | mongodb).

source
object

Where a compute service’s running image comes from: an image somebody deployed (type=image, the absence of a connected source) or a connected repository (type=github).

build
object
nextActions
object[]