Connect repositories and manage git-based deployments.
Connect a Git repository to a pod for automatic or manual deployments. Supports GitHub (with webhooks and commit status checks) and any Git URL via HTTPS.
Git repository URL (HTTPS). The URL only: one containing a space (the tail of a pasted git clone <url> <dir>) or starting with a dash is rejected with 400
branch
string
No
Branch to deploy (default: main)
auth_token
string
No
Personal access token for private repos
build_command
string
No
Custom build command (overrides auto-detection)
auto_deploy
boolean
No
Deploy on push (default: true)
Response: 201 CreatedReturns the git config object.Errors:
All fields are optional. Only provided fields are updated; send "" to clear one and fall back to
auto-detection.
Field
Description
branch
Branch to deploy from
install_command
Dependency install, run first
build_command
Build, run after install
start_command
The long-running process that serves the app
release_command
One-shot command run after build and after managed services are wired, on every deploy - your database migration. A failing release command fails the deploy
subdirectory
Path within the repo to deploy, for monorepos
auto_deploy
Whether a push to the branch triggers a deploy
Response: 200 OK
Disconnect
DELETE /api/pods/{name}/git
Response: 200 OK
{ "status": "disconnected"}
Trigger Deploy
POST /api/pods/{name}/git/deploy
No request body required. Pulls the latest code from the configured branch and deploys.Response: 202 Accepted
Target deployment ID (defaults to previous deployment)
Response: 202 AcceptedReturns a new deployment object with trigger: "rollback".
Webhooks
These endpoints are public (no auth required). They receive push events from Git providers.
POST /api/webhooks/githubPOST /api/webhooks/git/{podName}
The GitHub webhook is configured automatically when connecting a GitHub repository. For other providers, use the generic webhook URL shown in the dashboard.Commits containing [skip deploy] in the message are ignored.
Repair Auto-Deploy
POST /api/pods/{name}/git/webhook
Re-creates the push webhook for a pod whose auto-deploy has stopped firing. Use it when the pod is
connected to a repository, auto-deploy is on, but pushes no longer trigger a build - usually because
the repository was connected with a token rather than through the GitHub App, and the webhook was
deleted or never created.No request body. A pod already deploying through the GitHub App is a no-op.Response: 200 OK
If the webhook can’t be created for you - you need admin rights on the repository - the response is
still 200, but carries an error field alongside the config, and the config now contains a
webhook secret so you can add the hook by hand:
{ "config": { "...": "..." }, "error": "could not create the webhook automatically - add it manually with the URL and secret below (you need admin rights on the repository)"}
Returns 404 if the pod has no repository connected.
GitHub App
The InstaPods GitHub App is what lets you browse and deploy private repositories without pasting a
token. These endpoints back the GitHub card on Dashboard → Integrations. All require
authentication.
An empty installations list means different things depending on the flags, which is why they’re
there:
Field
Meaning when set
configured
Whether the GitHub App is wired up at all. false means we couldn’t ask GitHub, not that you have no installations
requires_github_link
You have no linked GitHub identity (you signed up with Google or email). Sign in with GitHub before installing the App
connection
The GitHub account you’re linked as. Absent when the link is missing or expired
app_install_url
Where to send someone who has no installation yet
List Repositories in an Installation
GET /api/github/installations/{installationId}/repos
Returns the repositories that installation can see.
An installation whose repository_selection is selected only exposes the repos you ticked when
installing the App. That is far and away the most common reason this list comes back empty or
missing the repo you wanted; fix it at the installation’s html_url on GitHub.
Code
Reason
400
GitHub App not configured, or the installation ID isn’t a number
403
Your GitHub account isn’t linked, or that installation isn’t one you can access
Create a Repository
POST /api/github/repos
Creates a new repository on your GitHub account. Used by the dashboard when you want a pod’s code
pushed somewhere it can auto-deploy from.
{ "name": "my-api", "description": "API for my app", "private": true}
Response: 201 Created - returns the created repository. Returns 400 if name is missing or
your GitHub account isn’t linked.