Upload a Deploy
Upload a new version of a static app as a .zip of built files (with index.html at the publish-dir root). The archive is staged and a build job is enqueued; the build runs asynchronously in the background. Send multipart/form-data with a single file field.
Request (multipart/form-data)
file file (.zip)
Required. A
.zip of your built static site. Max size is plan-limited (default 100 MB).Response (202 Accepted)
uuid string
The new deploy's identifier.
trigger_type string
upload.status string
queued — poll the list until it reaches ready.Errors
400 / 413
Missing/non-zip
file (400) or over the size limit (413).403 / 507
Storage quota exceeded (403) or object storage not configured (507).
Request
curl -X POST "https://api.ngris.com/v1/applications/a1b2c3d4-…/deploys" \
-H "X-API-KEY: <your_api_key>" \
-F "file=@dist.zip"
Response — 202 Accepted
{
"uuid": "d3e4f5…",
"application_id": 12,
"trigger_type": "upload",
"status": "queued",
"git_sha": null,
"created_at": "2026-07-28T12:10:00Z"
}
List Deploys
List an app's deploys, newest first (up to 100). Poll this after an upload or a git push to watch a build progress.
Deploy fields
uuid string
Deploy identifier (used to activate).
version int
Monotonic version number.
trigger_type string
upload, git_manual, or git_push.status string
queued → building → ready (or failed); a replaced live version becomes superseded.size_bytes / file_count int
Total bytes and file count (set once built).
git_sha string | null
The deployed commit (git deploys).
error string | null
Build failure reason when
status = failed.Response — 200 OK
{
"deploys": [
{ "uuid": "d3e4f5…", "version": 2, "trigger_type": "git_push", "status": "ready", "size_bytes": 1048576, "file_count": 42, "git_sha": "9fce…", "created_at": "2026-07-28T12:12:00Z" },
{ "uuid": "c2d3e4…", "version": 1, "trigger_type": "upload", "status": "superseded", "created_at": "2026-07-28T12:10:00Z" }
]
}
Activate (Promote / Rollback)
Make a ready (or previously superseded) deploy the live version — an atomic pointer flip, with no rebuild and no downtime. Use it to promote a specific version or roll back.
The build worker auto-activates the first successful deploy, so you only call this to switch versions afterward.
Response (200 OK)
status string
ok.current_deploy_id int64
The now-live deploy.
Errors
404
Deploy not found or belongs to another application.
409
The deploy is not
ready/superseded (e.g. still building or failed).Request
curl -X POST \
"https://api.ngris.com/v1/applications/a1b2c3d4-…/deploys/c2d3e4…/activate" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "status": "ok", "current_deploy_id": 455 }