Update Serving and Build Config
Update how an application's files are served and how it is built. This is a partial update — only the fields you send change. The source and type cannot be changed (create a new app to switch source).
Request body
dist). When Ngris builds the site, leave it empty and set output_dir instead; setting both to dist makes the site be looked for in dist/dist. Leading and trailing slashes are trimmed; a value containing .. is read as the archive root. Empty = archive root.index.html.true, unmatched paths serve the index document — enable for React/Vue/Svelte client-side routing.spa_fallback is off (a custom 404 page)."" = the repository root. Repo-relative: no leading /, no ... Takes effect on the next deploy.false. When true, every new deploy for this app — including git production-branch pushes — builds as a not-live candidate; you then promote it to production by hand. This is the whole-app version of the per-deploy activate=false flag: leave it false to keep the default auto-go-live behaviour.false. Turns on Skew Protection — the edge pins each served HTML document to its deploy (a 24h ngris_dpl cookie) and, on an asset the newer deploy no longer ships, retries it against the pinned deploy, so a mid-session redeploy doesn't 404 stale hashed chunks for visitors already on the old page. Enabling requires the paid skew_protection entitlement — without it the request returns 403. Disabling (false) is always allowed.false. Turns on real-user Speed Insights (Core Web Vitals) collection for the app. Enabling requires the paid speed_insights entitlement — without it the request returns 403. Disabling (false) is always allowed. When on, the edge serves the collector script on the app's own domain and auto-injects it into served HTML for static and fullstack static front-ends.static and fullstack (the front end), and managed (Node apps only: a Python or Go app's build fails with one). "" = detected.static and fullstack (the front end), and managed (Python: after the dependencies; Go: must write /app/server). "" = detected.static and fullstack (the front end): the folder the build writes the site to, inside the project (e.g. dist); everything in it is published. Leading and trailing slashes are trimmed; no ..; . = the project root; at most 512 bytes. Used only when a build runs. "" = detected.managed, and fullstack (the backend): how the server starts, run with a shell; the server must listen on $PORT. npm start, npm run <name>, yarn <name> and pnpm <name> run that package.json script. See Backend Apps. "" = detected.The four build settings are trimmed, and each command is one line of at most 1024 bytes (chain steps with &&; control and invisible characters are refused). A function or wordpress app takes none of them. A value the app's type can't take is refused; "" (back to detection) is always accepted. They apply from the next build: saving doesn't rebuild.
Response (200 OK)
The updated application, the same object as Get Application (not wrapped). Serving config changes apply to the next request served (no rebuild needed); root_directory and the build settings apply to the next deploy.
Deprecated: until the sunset the application object also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
root_directory, a refused build setting — install_command must be a single line (chain commands with &&) of at most 1024 bytes (the same for build_command and start_command), invalid output_dir: must be a folder inside the project, like dist or build/site (no '..'), or a build setting the app's type can't take, e.g. start_command can only be set on a managed or full-stack app, output_dir can only be set on a static or full-stack app, install_command can only be set on a static, managed or full-stack app — or a malformed body. Nothing is saved.skew_protection_enabled or speed_insights_enabled without the matching entitlement.quota_paused); delete something or upgrade first.