API reference
Everything you can do from the dashboard to a project — create it, deploy it, read its build log, stop and start it, set its environment and attach domains — you can also do from a script or a CI pipeline.
Basics
The base URL is https://kernel6.com/api. Requests and responses are JSON; send Content-Type: application/json with any request that has a body.
Authentication
Create a key in Settings → API keys. It looks like k6_ followed by 43 characters and is shown once, when you create it — we only store a hash of it, so it cannot be shown again. Send it on every request:
Authorization: Bearer k6_…- A key acts as you, on your projects only. You can hold up to 10 active keys.
- Revoking a key in Settings takes effect on the next request. Changing your password does not revoke keys — revoke them separately if you think one has leaked.
- Keys work on the endpoints below and nowhere else. Billing, invoices, your account, password, project deletion, removing domains and managing keys themselves all require you to be signed in to the dashboard.
- Endpoints marked paid need an active subscription, exactly as in the dashboard.
Errors
Every error has the same shape — an HTTP status and a single human-readable message:
{ "error": "A deployment is already in progress for this project" }| Status | Meaning |
|---|---|
| 400 | The request was invalid — the message says which field and why. |
| 401 | No credentials (Not logged in), or a key that is unknown or revoked (Invalid or revoked API key). |
| 402 | A paid endpoint without an active subscription, or the project limit on your account. |
| 404 | The project or deployment does not exist, or is not yours. |
| 409 | Conflicts with the project's state — e.g. a deploy is already running. |
| 502 / 503 | We could not reach your server, or no server is available to place a new project on. |
Projects
List projects
GET /api/projectsYour projects, newest first. Environment variables are never included.
{
"projects": [
{
"_id": "6a594d2b0199b790812c18ad",
"name": "acme-store",
"repoUrl": "https://github.com/acme/store",
"branch": "main",
"status": "live",
"url": "https://812c18ad.apps.kernel6.com",
"port": 4001,
"lastDeployedAt": "2026-10-03T09:30:00.000Z",
"settings": { "rootDirectory": "", "installCommand": "", "buildCommand": "", "startCommand": "", "nodeVersion": "" },
"createdAt": "…",
"updatedAt": "…"
}
]
}status is one of new (never deployed), deploying, live, failed or stopped.
Create a project · paid
POST /api/projects
{ "name": "acme-store", "repoUrl": "https://github.com/acme/store", "branch": "main" }repoUrl must be a plain https Git URL. branch is optional and defaults to main. Returns 201 with { "project": { … } }. Creating a project does not deploy it.
Get a project
GET /api/projects/:idThe project plus its 20 most recent deployments (without their logs — fetch a deployment for those):
{ "project": { … }, "deployments": [ { "_id": "…", "status": "live", "url": "…", "createdAt": "…", "finishedAt": "…" } ] }Deployments
Trigger a deploy · paid
POST /api/projects/:id/deployStarts a deployment of the project's branch and returns immediately with 202:
{ "deploymentId": "6a5a1f0c2b7e4d0012ab34cd" }Returns 409 if a deployment for this project is already queued or building. Environment variable changes only reach the running app through a deploy.
Get a deployment and its log
GET /api/deployments/:id{
"deployment": {
"_id": "6a5a1f0c2b7e4d0012ab34cd",
"project": "6a594d2b0199b790812c18ad",
"status": "building",
"logs": "==> Deployment queued\n==> Connecting to …\n",
"url": null,
"finishedAt": null,
"createdAt": "…",
"updatedAt": "…"
}
}status moves from queued to building and ends at live or failed. logs is the full build output so far; poll every few seconds until the status is final.
Start, stop or restart · paid
POST /api/projects/:id/actions
{ "action": "restart" }action is start, stop or restart. Returns { "ok": true, "status": "live" } (or "stopped"). 409 while a deploy is running or before the first deploy.
Environment variables
List names
GET /api/projects/:id/envWith an API key this returns the names only. Values stay readable in the dashboard, but a key — which lives in CI settings and shell history — never gets them back.
{ "envVars": [ { "key": "DATABASE_URL" }, { "key": "SMTP_PASSWORD" } ], "valuesHidden": true }Replace all variables · paid
PUT /api/projects/:id/env
{ "envVars": [ { "key": "DATABASE_URL", "value": "postgres://…" }, { "key": "NODE_ENV", "value": "production" } ] }This replaces the whole set — any variable you leave out is removed. Names use letters, digits and underscores and cannot start with a digit; values can be up to 4,096 characters with no line breaks; at most 100 per project. Returns { "ok": true, "count": 2, "redeployRequired": true } — trigger a deploy for the app to see the new values.
Domains
List domains
GET /api/projects/:id/domains{
"defaultHostname": "812c18ad.apps.kernel6.com",
"pointTo": "203.0.113.10",
"domains": [ { "hostname": "www.acmestore.in", "status": "verified", "lastCheckedAt": "…", "lastError": null } ],
"max": 5
}pointTo is the address your domain's A record must point at. status is pending, verified or failed.
Add a domain · paid
POST /api/projects/:id/domains
{ "hostname": "www.acmestore.in" }The DNS is checked straight away. Returns 201 with the domain and the result of that check (status, expected, lastError). Up to 5 domains per project; a domain can only belong to one project on the platform.
Example: deploy from CI and wait for the result
#!/usr/bin/env bash
set -euo pipefail
API=https://kernel6.com/api
AUTH="Authorization: Bearer $KERNEL6_API_KEY"
PROJECT=6a594d2b0199b790812c18ad
id=$(curl -fsS -X POST -H "$AUTH" "$API/projects/$PROJECT/deploy" | jq -r .deploymentId)
echo "Deployment $id started"
while :; do
status=$(curl -fsS -H "$AUTH" "$API/deployments/$id" | jq -r .deployment.status)
case "$status" in
live) echo "Live"; exit 0 ;;
failed) curl -fsS -H "$AUTH" "$API/deployments/$id" | jq -r .deployment.logs | tail -40; exit 1 ;;
*) sleep 5 ;;
esac
doneStore the key as a secret in your CI (for GitHub Actions, a repository secret named KERNEL6_API_KEY), never in the repository itself. Questions or a missing endpoint? Tell us.