Skip to main content

API reference

The API starts deployments and reads their results. It uses bearer tokens; see API tokens and deploying from CI for how to create one and a complete pipeline example.

All calls are under /api/v1 on your panel's address. Send Accept: application/json and Authorization: Bearer <token>. Only https should be used.

Abilities​

AbilityAllowsNeeds the owner to hold
apps:readList apps, read an app and its deploymentsapps.view
apps:deployStart a deploymentapps.deploy

A token can also be limited to some apps. A token is checked against its owner's current permissions on every call.

Endpoints​

CallAbilityAnswer
GET /appsapps:read{"data": [app, ...]}, only the apps the token may see
GET /apps/{slug}apps:read{"data": app}
POST /apps/{slug}/deploymentsapps:deploy202 and {"data": deployment}
GET /apps/{slug}/deployments/{number}apps:read{"data": deployment}; add ?log=1 for the build log

Objects​

An app:

FieldMeaning
slug, nameThe app's identifier and name
statusnew, deploying, running, failed, stopped or deactivated
stackdotnet, go, node, dockerfile or null
domainsConnected domain names
live_deploymentThe number of the release that is live, or null
latest_deploymentThe newest deployment (a deployment object), or null
created_atISO 8601 time

A deployment:

FieldMeaning
numberThe release number
statusqueued, building, starting, rollout (a gradual rollout is proving it), active, superseded, rolled_back (it went live and was rolled back by itself), failed or stopped
stagefetch, build, release, start, health, switch or done
finishedtrue once it is over, whatever the result
succeededtrue if it went live (it is active, or was and has been replaced)
commit, commit_messageThe short commit and its first line, if known
is_rollbacktrue for a rollback
errorThe reason, for a failure
created_at, finished_atISO 8601 times
urlThe address of this deployment in the API
logThe build log, only with ?log=1

The API never returns environment variables, keys, tokens or webhook secrets.

Status codes​

CodeMeaning
200, 202Success; 202 means the deployment was queued
401No token, a wrong or expired one, or its owner no longer exists
403The token lacks the ability, or its owner lost the permission
404No such app or deployment, or the app is outside the token's limit
409A deployment is already in progress (its details are in the answer), or the app is stopped
429Too many calls

Limits​

  • 60 calls a minute per token.
  • Calls without a valid token get 20 a minute per address, and failed attempts are counted before the token is looked up, so guessing a token is slow from the first try.
  • There is no CORS: browsers on other sites cannot call the API. Keep tokens out of front-end code.