The manifest #
On this page
An application manifest is a JSON document that declares your application's services, network access, and deployment settings. Submit the complete document with submit_manifest; it replaces the stored manifest. Deploys use that stored manifest.
Before submitting, ask your AI assistant to read context://manifest_schema. Without an MCP connection, read the JSON schema at https://dev.turnzero.ai/cloud/reference/sources/schemas/manifest.schema.json or its reference page. Validation errors identify each invalid field by its JSON path. Author the manifest gives complete examples.
The members #
The schema requires six fields and allows nine optional fields, including health. An application that runs a server still needs health. Unknown fields are rejected. Use create_environment to add development; an environments field is rejected as environment_unsupported. The server's port is also set outside the manifest: listen on PORT, which the platform sets to 8080 (Runtime settings).
For an application that runs a server and uses no services, outside hosts, or library packages, this is a complete manifest:
{
"manifest_version": 1,
"services": [],
"health": "/health",
"region": "usa",
"egress": [],
"audience": { "kind": "public" },
"packages": []
}
A service is one more entry in services, such as {"kind": "database"} for a database (Add a database).
| Member | What it declares |
|---|---|
manifest_version |
The version of the manifest format, the integer 1. |
services |
Provisioned services. Each is an object with a kind and the fields listed below. An empty array declares none. Every accepted app is hosted without an entry. |
health |
The absolute path on the application's own address that the deploy health check requests on every deploy, promote and platform redeploy. A server application needs this field when you deploy it. Without it, the deploy returns health_path_undeclared. The same refusal applies to submit_manifest and check_manifest if either environment has a server or a server application is deploying, promoting or redeploying. When the target environment serves no version, the platform scans the ZIP for the path's last segment. A completed scan that finds no source file naming that segment refuses the deploy with health_path_unserved. |
region |
Where the application runs: usa, the one region a submission accepts. The application's database, its stored files, and its logs, backups included, stay in the United States. europe, uk, and global are refused region_unavailable, and any other value is refused manifest_invalid. |
egress |
The outbound hosts the application's own process may reach: exact lowercase hostnames and *.example.com host families. An empty array declares no external hosts. A function's direct fetch refuses undeclared hosts in either mode. Egress firewall and request limits explains what the list controls in observe and enforce mode. |
audience |
Who may reach the app. {"kind":"public"}, {"kind":"invited"}, or {"kind":"workforce","tenant":…}. A workforce tenant is an Entra tenant ID or the company’s HTTPS OpenID Connect issuer. For any kind, requests_per_minute_without_session takes integers 10–3,000 (default 300 per minute per client address per router replica). invited and workforce allow session_free_paths. See The audience kinds. |
packages |
Included library entries, each with a name and version; fonts and library/prd use a null version. Use an empty array if no entries are included. turnzero library take --origin https://dev.turnzero.ai writes this field, creating the application manifest if needed. For a manual manifest, use the installed library's metadata or the catalog values for a chat without a folder. |
settings |
Optional. The settings the application's code reads, as an object from a setting name to {"secret": "<stored name>"} for a stored secret or {"value": "<text>"} for a value that is not secret. Each deploy and promote injects the value stored for its environment, or the plain value as written. See Bound settings. |
upstreams |
Optional. External APIs called through the gateway with stored keys. Each key in this object is an upstream name, and its value is that upstream's declaration. See Upstreams in the manifest. |
realm |
Optional. The sign-in setup of both end-user realms: sign_in_methods, creation, entra, oidc, and apple, as configure_app_sign_in takes them, and clients, the native apps, one list for each environment. See Sign-in and push in the manifest. |
websockets |
Optional. For a server, declares WebSocket upgrades, with origins, the other browser origins whose pages may open a connection. Without it every upgrade is refused. A serverless application's manifest refuses this member with serverless_no_websocket. Declare WebSockets in the manifest gives the rules for an origin. |
smoke_paths |
Optional. One to five read-only GET routes to check after a server's health check, before a deploy or promote of a version production does not already serve switches traffic. Serverless versions do not run this check. Use it for important routes whose failure should stop that switch. Leave it out to check only the health path. See Listing smoke paths. |
immutable_client_folder |
Optional. Names one folder below client/ whose files can be cached for a year on a public app. See Serve a web client. |
redirects |
Optional. Lists up to 200 rules that redirect a GET or HEAD from one exact path to another on the same hostname. Each rule gives a from, a to and a status of 301 or 302. See Redirect an exact path. |
application |
Optional. The application the project folder deploys to, as the lowercase UUID create_application returns. It declares nothing to the platform, which checks its form alone and does nothing else with it, and the deploy's manifest_notice leaves it out of its comparison. The turnzero command reads it before every deploy and check of the folder. See The folder's application. |
Service declarations #
Each kind of services entry takes these members besides its kind:
object_storagemay carryareas, the storage areas each submission declares (Store files). The other three kinds,database,accounts, andemail, take no other member.pushtakes only its providers.issue_trackingwith no other member gives the application one issue-tracking space for both environments. To use an existing space, give the ID of a space created for your account's issue list. A space provisioned for an application is bound to that application.Give
spaceas a single ID or as{ "development": ..., "production": ... }. Choosereport(the default) orcontribute. This binds the existing spaces without creating one.With
spaceatreport, you may also givecomponents. List one to two hundred declared component names, each once and at most 64 characters. The application's calls use areporttoken limited to those components. See the platform space rules.custom_domaintakes itsdomain, one lowercase hostname of at least three labels, such asapp.example.com.scheduletakes itsschedules, the declarations Run scheduled work describes.jobtakes ajobsarray for a server application. A job runs a script to completion in a separate container using the application's image. A schedule sends recurring requests to a handler. Declaring a job sets no time for it to start. While jobs are off, submissions with this kind returnjobs_not_availableunless an earlier check refuses them. See Declare jobs.
database, accounts, and an issue_tracking entry with no space provision what they declare. With object_storage, a submission declares each area listed in areas. The bare kind creates no area. A schedule entry records its schedules, and a custom_domain entry declares the application's own domain for production (Attach your own domain). A push entry allows the push configuration and the push routes. Its providers are named in the entry itself (Sign-in and push in the manifest) or configured afterwards with configure_push (Send push notifications).
The email service is available to every application. A schedule service entry must include its schedules array.
The audience kinds #
- Public. Anyone can reach the application.
- Invited. Application routes normally need an end-user session. See the exceptions below. The application's realms become invitation-only: a first sign-in without an invitation from
invite_end_userwithemailcreates no user, whatever the realm'screationsetting is. The owner needs an invitation for their first sign-in too, using any address they can read mail at (Invite each person). - Workforce. The application admits signed-in users of the company’s declared identity provider. With Microsoft Entra ID,
tenantis the company’s tenant ID (a GUID) and the realm’s only method isentrafor that tenant. With a company’s own OpenID Connect issuer,tenantis the issuer’s HTTPS address and the realm’s only method isoidc, withoidc.issuermatching that address exactly, including letter case and any trailing slash. Allow only one company’s staff gives the setup.
For a whole app or one page restricted to its owner, see A page for the owner alone.
invited and workforce usually require an end-user session. The platform's /__account/ paths, its own scheduled runs, and paths in session_free_paths need no end-user session. Without a session, GET and HEAD can read /.well-known/ documents that the realm's native client declarations enable. List a webhook or other service callback in session_free_paths to receive it without a session. The platform does not verify its sender. Check the provider's signature in your route. Choose who may sign up gives the list's rules.
For invited and workforce applications, the router rejects other requests from outside the platform if they have no session. Keep your server's session checks for local runs and tests, which have no platform router.
The deploy health check calls the health path from inside the platform, and the sign-in check never refuses it. So a deploy passes without listing the health path. List it in session_free_paths only where something outside the platform must probe it, such as an uptime monitor. The path, and every path below it, then answers anyone, so return nothing there that you would not show anyone.
Where the manifest of an application that runs a server declares health, the health.gated member of submit_manifest's answer says whether the sign-in check covers the path for a request from outside. Otherwise the answer has no health member.
Bound settings #
The settings member declares each setting the application's code reads, and it is reviewed and versioned with the code. Each entry takes one of two forms:
{"secret": "<stored name>"}binds a stored secret. The binding names the secret, never its value, and each environment reads the value stored at its own scope.{"value": "<text>"}sets a value that is not secret, such as a page title. The value is the same in every environment, at most 4,096 characters, with no line break or other control character. A secret never goes here: the manifest and each version's record keep the value as written.
A setting name is an upper-case letter, then upper-case letters, digits, or underscores, ending in a letter or a digit, at most 64 characters.
Bind a stored value to a setting gives the worked example, when a replaced value takes effect, and each refusal, and Set a value that is not secret gives the plain form's rules. Store a secret compares a binding with the gateway.
Upstreams in the manifest #
An upstream is an external API called through the gateway, which adds its stored key. Declaring it in the manifest avoids a separate declare_outbound_api call. The key supplies the upstream name. The entry requires base_url, credential_name, and auth_header. It can also specify auth_format, token_shape, and sdk_settings. submit_manifest supplies the application. Use the separate action to end a declaration.
Upstream names must be unique within your account. When copying an application into the same account, give its upstreams new names. A name already used by another application is rejected. The refusal names that application.
While the member lists an upstream, the manifest controls it, and declare_outbound_api refuses to change it. An upstream the member does not list can still be changed with declare_outbound_api. A submission leaves the upstream declared. If it removes the upstream's sdk_settings.key, the platform revokes its egress keys from running copies. declare_outbound_api with remove: true ends one once the member no longer lists it. Author the manifest shows the member and its refusals.
Sign-in and push in the manifest #
The realm member declares the sign-in setup that is the same in every environment: the sign-in methods, who may create an account, and the entra, oidc, and apple route members. Its clients declares the native apps that sign in, with one list for each environment, each list going to that environment's realm alone. A push entry in services may also name its providers, apns and fcm. Each credential member names a stored secret, never its value.
With these members and upstreams, re-creating an application, or copying it into another account, takes the manifest, a store_secret for each credential and key, and a deploy. What the manifest names needs no configure_app_sign_in or configure_push call. Set the limits, the session lengths, each native client's minimum version and update URL, and Apple's push gateway again where they differ from the defaults.
While the manifest names a field, it controls that field, and configure_app_sign_in or configure_push refuses to change it. The settings that differ by environment stay with the actions: a realm's limits, session lengths, and invitation days, each native client's minimum version and update URL, and Apple's push gateway. Configure the realm lists which realm fields the manifest owns and which configure_app_sign_in owns, and Author the manifest shows the members.
The folder's application #
The application member binds the project folder to the application it deploys to. The turnzero command reads the folder's manifest.json before every deploy and check, before it zips the folder or sends anything. Where the command's --application names another application, or the member is not an application id, the command ends with status 3 and nothing is sent. So a copied project that names another account's application is refused too.
The scaffold command writes the member where it names --application. Otherwise the first deploy that goes on to upload writes it and prints a bound: line. Before writing the application identifier, the command prints a binding: line that names the change to manifest.json. To deploy the folder to another application on purpose, ask the account's owner, then change or remove the member. Development and production are environments of one application, so the member covers both.
Keep the member in the manifest you pass to submit_manifest once the scaffold or a deploy writes it. The platform checks only its form and records the manifest for the application the call names. The platform also accepts a submission without the application field, and a deploy's manifest_notice leaves the member out of its comparison.
For a server, the folder's top holds package.json and manifest.json. In a server project with an app/ folder, both sit in app/, with the code, and the library folder system/ sits beside app/. A static site's folder holds manifest.json and client/; it needs no package.json (Publish a static site). The two project layouts shows both forms. Run turnzero hash --origin https://dev.turnzero.ai in that folder to build the zip a deploy would, with no sign-in: it sends nothing and prints the folder's warnings (Checking a deploy).
What submitting does #
A submission can change how people reach an app that is already serving. Routers use the saved audience, paths that allow signed-out requests, anonymous request limit, and WebSocket rules when they refresh. These changes need no new build.
submit_manifest also sets up the services the manifest declares:
- Database. The first database declaration creates the development database and its role at submission, on every application, for local runs. While the manifest declares the kind, the first deploy to production creates the production database and role on one environment, and the first promote creates them on two.
- Accounts. The first accounts declaration creates an end-user realm for each environment the application has: production's alone on one environment. The production realm stays until the application is deleted. A development realm is created by
create_environmentor by a submission while development is on, and ends withdelete_environmentor with the application. - Credentials. The first submission creates a development platform credential and, when a database is declared, its credential. Manifest submission returns no standing production credential. Declare the manifest says how your AI assistant receives them, and how the provision command writes them for a local run. For approved access from your computer to the production database, follow Connect to your database.
- Bound settings. A
settingsmember provisions nothing. The result'ssettingsrows say, per bound setting and environment the application has, whether the bound name is stored there yet. A plain setting has no row. - Upstreams. An
upstreamsmember declares each upstream, asdeclare_outbound_apiwould, from that moment. A key not stored yet is accepted. The result'supstreamsrows say, per upstream and environment, whether its key is stored there. When an entry drops its key setting, the platform ends the egress keys that running copies have for its upstream, andegress_keys_endedcounts them. Adetailline names each environment that lost one and how to restore it: restoresdk_settings.key, submit, then callrestart_applicationthere. If theegresslist allows an upstream's host, the response includesegress_notice. - Sign-in and push. A
realmmember configures the realm of each environment the application has, and apushentry's providers configure each of those environments, as the two actions would. On one environment that is production alone, andcreate_environmentconfigures development when it adds it. A credential not stored yet is accepted. The result'sdetailnames each one not stored yet, with the environment where only one environment lacks it. - WebSockets. A
websocketsmember provisions nothing. The serving router reads it within about 30 seconds. Both Shared 0.5 GB and Shared 1 GB then admit upgrades from the origins the declaration allows, on shared compute and in their own container (Deploy and test). - Outbound hosts for functions. When the set of hosts changes, Cloud tries to refresh the running settings in each environment serving functions. Cloud can save the manifest even if that refresh cannot start. Check the environment's status before relying on the new list. A later successful deploy, promote or restart refreshes those settings.
- Schedules. Submission records the schedule declarations, and each starts to fire after a later deploy or promote, as Run scheduled work describes.
Validation finishes before provisioning starts. Provisioning can still fail partway through, leaving the manifest saved and some resources created. Follow the response's retry instructions; Reading a refusal explains this case.
check_manifest runs the same validation and lists the paths added, removed, and changed without recording the manifest or setting up services. It does not predict refusals during setup or custom domain writes. It does not predict the sign-outs or invalidation of held codes for test end users caused by changing to a work-account audience or another tenant.
Changing the manifest #
Change the manifest through submit_manifest, and send the whole document. A submission replaces the recorded manifest, so a member you leave out removes that declaration. A deploy reads the recorded manifest and does not change it. The manifest-author skill writes or changes a manifest against the published schema, and the add-service skill adds a service declaration.
Removing a declaration changes the saved manifest. The effect depends on the declaration:
- A removed database, with its role, remains until
delete_environmentremoves the development database ordelete_applicationremoves both. - A removed accounts declaration leaves each realm in place on the same terms.
- A removed schedule declaration runs no more, and its run records are kept.
- A removed upstream entry stays declared, and
declare_outbound_apican change it again. It ends when you calldeclare_outbound_apiwithremove: true, or when the application or your account is deleted. Follow the deploy and removal order in End an upstream. While the platform's store answers, its calls are refused in both environments within about 30 seconds by default. During a store outage, a gateway may keep using its cached declaration for up to an hour. - A removed
realmfield orpushprovider keeps its configuration, andconfigure_app_sign_inorconfigure_pushcan change it again. - If you remove
websocketsor an allowed origin, the router refuses new WebSocket connections that the removed declaration allowed. It also closes existing connections that depended on that declaration with code 1008, within about 30 seconds. - Removing a custom domain declaration starts detaching the domain.
A binding or a plain value added, changed, or removed takes effect at the environment's next deploy or promote. A restart re-applies the bindings and plain values the running copy was started with, never the current manifest's. A rollback restores the bindings and plain values that version last used in production. If production never ran the version, the rollback uses the settings recorded at its deploy.
The platform gives a deployed copy what the environment has, not what the manifest declares. While a database remains, each deploy or promote supplies the connection string of the environment it reaches. While a realm remains, the deploy and the promote still supply its public keys. A production deploy or promote creates a missing production database only if the manifest declares the database service. If you remove that declaration, an existing database is reused. If no database remains, declare the service again; the next production deploy or promote creates the database.
Submitting an unchanged manifest records it again. Where the development database and the development platform credential already exist, it provisions nothing new and creates no credential. New development credentials come from turnzero provision --origin https://dev.turnzero.ai --application <application id>, run with nothing piped, and the provision command it leads to, which calls store_secret with replace: true on the development scope.
Related #
- Author the manifest writes and submits a manifest, reads a refusal, and runs scheduled work.
- Applications and environments explains the environments the manifest's services are provisioned for.
- Egress firewall and request limits explains what the
egressmember controls, and the observe and enforce modes. - Make sign-up invitation-only and Manage end users cover what the
audiencemember and the accounts service do for an application's users. - Use the feature package library writes the
packagesmember, by thelibrary takecommand or by hand. - Glossary defines the terms used on this page.