Create Application

POST /v1/applications

Create an application — the content unit. Deploy files to it (upload or git) and expose it with an agentless endpoint. To do all of that in one call, use Quick Deploy instead.

With source: "upload" the app starts empty — upload a .zip next. With source: "git" the repo is connected and the first deploy is enqueued automatically.

Application types

The type field selects which components the application carries:

static
Default. A frontend only — your .zip upload or git repo is built (or served as-is) to static files on the edge. Requires the application_hosting entitlement.
managed
A managed backend — a long-running server built from a Dockerfile into a signed, scanned, digest-pinned container image, run gVisor-isolated and reached through a managed endpoint. Requires the managed_backends entitlement, and creates the runtime spec.
fullstack
Both: a static frontend on the edge and a managed backend, with the backend_paths prefixes (default ["/api"]) path-routed to the backend.
function
A serverless function — a handler you write, wrapped in a base runtime image and run scale-to-zero (cold-started by the edge on the first request, reaped back to zero when idle). Requires the functions_enabled entitlement (and honours the max_functions quota); configured with the function_* fields below. See the Serverless functions guide.
Static builds vs. backend images. A static app builds to files. A managed / fullstack app builds a container image from your Dockerfile — signed, vulnerability-scanned, and pinned to its digest so a rollback is an immutable pointer. Tune the runtime (port, health check, replicas, cpu/mem) via PUT /runtime. Only MySQL / MariaDB managed databases are available today.

Request body

name string
Required. Unique within the account (1–255 chars).
type string
static (default), managed, fullstack, or function (see above).
source string
upload (default) or git.
repo_url string
Required for git. A github.com / gitlab.com URL.
branch string
Git only. Default main.
git_token string
Git only, optional. Token for private repos; encrypted at rest.
backend_paths string[]
fullstack only. URL path prefixes routed to the backend (each /-rooted; max 20). Default ["/api"].
function_runtime string
function only. Base runtime: nodejs20 (default) or nodejs22.
function_handler string
function only. Entry as <file>:<export>. Default index.js:default.
function_idle_seconds int
function only. Scale to zero after this many idle seconds (0 = never; 03600). Default 300.
function_timeout_seconds int
function only. Per-request wall-clock cap (1300). Default 30.
function_max_concurrency int
function only. Concurrent requests per instance before scale-up (1200). Default 40.
prod_visibility string
Optional. public or private — who can reach the production URL. Default public. Change later with PUT /visibility.
preview_visibility string
Optional. public or private — who can reach preview URLs. Default private.

Response (201 Created)

uuid string
Stable identifier used in every other /applications/{uuid} URL.
name string
The application name.
type string
static, managed, or fullstack — whichever you requested. A managed / fullstack app also returns a runtime object.
source string
upload or git.
current_deploy_id int64 | null
The live deploy, or null until the first build is ready.
publish_dir string
Site-root subfolder (empty = archive root).
index_document string
Directory index, default index.html.
spa_fallback boolean
Serve the index for unmatched paths (SPA routing).
prod_visibility string
public or private — production-URL access (default public).
preview_visibility string
public or private — preview-URL access (default private).
git object | absent
For git apps: {provider, repo_url, owner, repo, branch, auto_deploy} (token + secret redacted).

Errors

400
Missing/too-long name, bad source, an invalid repo_url, or invalid backend_paths.
403
Not entitled — application_hosting for static apps, managed_backends for managed/fullstack, functions_enabled for function — or the applications_max (or max_functions) quota is reached.
409
An application with that name already exists.
Request — upload source
curl -X POST "https://api.ngris.com/v1/applications" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "my-site", "source": "upload" }'
Request — git source
curl -X POST "https://api.ngris.com/v1/applications" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "my-site", "source": "git", "repo_url": "https://github.com/acme/site", "branch": "main" }'
Request — serverless function
curl -X POST "https://api.ngris.com/v1/applications" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "my-fn", "type": "function", "source": "upload", "function_runtime": "nodejs20" }'
Response — 201 Created
{ "uuid": "a1b2c3d4-…", "name": "my-site", "type": "static", "source": "git", "current_deploy_id": null, "publish_dir": "", "index_document": "index.html", "spa_fallback": false, "prod_visibility": "public", "preview_visibility": "private", "git": { "provider": "github", "repo_url": "https://github.com/acme/site", "branch": "main", "auto_deploy": true }, "created_at": "2026-07-28T12:00:00Z" }
On this page
Create Application