Skip to main content
PUT
Set service source

Authorizations

Authorization
string
header
required

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

Path Parameters

projectId
string<uuid>
required
serviceId
string<uuid>
required

Body

application/json
owner
string
required
repo
string
required
type
enum<string>
Available options:
github
installationId
integer

GitHub App installation id; required unless public

repoId
integer

GitHub repository id; required unless public

public
boolean

a public repo, connected without an App installation: one-shot deploys, auto_deploy is always false

branch
string

the repo branch to track; default: the repo’s default branch

rootDir
string | null

subdirectory to build from (monorepo); relative, no leading / or ..; null/omitted = repo root. It also decides which pushes deploy this service: the build context is this directory, so a push that changed nothing under it is skipped

autoDeploy
boolean

rebuild on every push to branch (default true; must be false or omitted for a public repo)

buildCommand
string | null
startCommand
string | null
watchPaths
string[] | null

An include list of gitignore patterns, matched against paths RELATIVE TO THE REPOSITORY ROOT rather than to rootDir — e.g. ["apps/web/", "packages/ui/"]. A push deploys this service only when it changed a matching path; omit or null to fall back to the root-directory rule (a service with rootDir deploys when a push changed something under it, one building from the repo root deploys on every push). ! narrows the list under git's own rule that a path cannot be re-included once an earlier pattern took its directory, so ["apps/web/", "!/*.md"] drops apps/web/README.md but not apps/web/docs/guide.md. Inert on a public repo, which cannot auto-deploy at all

port
integer | null

the port the app listens on; written to the service

Required range: 1 <= x <= 65535

Response

Default Response

source
object
required

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
required