Update Serving Config
Update how an application's files are served. This is a partial update — only the fields you send change. It updates serving configuration only; the source and type cannot be changed (create a new app to switch source).
Request body
name string
Optional. Rename the application (still unique within the account).
publish_dir string
Optional. The subfolder that is your site root (e.g.
dist). Normalized; path traversal is rejected. Empty = archive root.index_document string
Optional. Document served for directory/root requests. Default
index.html.spa_fallback boolean
Optional. When
true, unmatched paths serve the index document — enable for React/Vue/Svelte client-side routing.not_found_path string
Optional. A document served for missing paths when
spa_fallback is off (a custom 404 page).Response (200 OK)
application object
The updated application. Serving config changes apply to the next request served (no rebuild needed).
Errors
400
Invalid
publish_dir (traversal) or malformed body.404
Unknown application.
Request
curl -X PUT "https://api.ngris.com/v1/applications/a1b2c3d4-…" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"publish_dir": "dist",
"spa_fallback": true
}'
Response — 200 OK
{
"uuid": "a1b2c3d4-…",
"name": "my-site",
"publish_dir": "dist",
"index_document": "index.html",
"spa_fallback": true,
"not_found_path": null
}