Docs/API Reference

API Reference

The engine serves a REST API under /api/v1 on port 9090. All endpoints require a session cookie except setup, auth, webhooks, and self-update routes.

Projects

MethodPathDescription
POST/api/v1/projectsCreate project
GET/api/v1/projectsList all projects
GET/api/v1/projects/:idGet project
PATCH/api/v1/projects/:idUpdate branch / port / buildContext
PATCH/api/v1/projects/:id/envUpdate env vars (encrypted at rest)
DELETE/api/v1/projects/:idDelete project
POST/api/v1/projects/:id/rollbackRollback to previous deployment
POST/api/v1/projects/:id/cancel-deployCancel in-progress deployment
POST/api/v1/projects/:id/generate-pipelineAI-generate GitHub Actions CI

Deployments & environments

MethodPathDescription
POST/api/v1/deployTrigger deployment { projectId }
GET/api/v1/deploymentsList all deployments
GET/api/v1/statusCurrent active deployment
POST/api/v1/projects/:id/environments/:envId/promotePromote build from source environment

GitHub integration

MethodPathDescription
GET/api/auth/github/installStart official App install (redirects to GitHub)
GET/api/auth/github/callbackInstall callback (via versiongate.tech relay)
GET/api/github/reposList repositories for the installation
GET/api/github/repos/:owner/:repo/branchesList branches
POST/api/webhooks/githubDirect GitHub signature webhook (dev / advanced)
POST/api/webhooks/github/relayFan-out from versiongate.tech (hop-signed)

Public relay routes on versiongate.tech: GET /api/github/callback, POST /api/github/register, POST /api/webhooks/github.

System

MethodPathDescription
GET/api/v1/system/preflightHost compatibility checks (no DB required)
GET/api/v1/system/server-statsHost CPU / memory / disk / network
POST/api/v1/system/reconcileManual crash-recovery trigger
GET/healthEngine health check

Setup

MethodPathDescription
GET/api/v1/setup/statusReturns { configured: boolean }
POST/api/v1/setup/applyApply initial config { domain, databaseUrl, geminiApiKey? }

Full environment-variable reference lives in the repository's docs/SETUP.md.

Authentication
Create the first admin with bun run create-admin, then sign in at /login. API requests use the session cookie issued on login.