---
title: "check_deploy"
description: "Generated reference for the management action check_deploy: its description, access metadata, payload contract, and registration status."
slug: /reference/actions/check-deploy
order: 28
visibility: public
redirects_from: []
---

# check\_deploy

Generated automatically from the [published contract sources](/cloud/reference/about/#contract-sources).

A script calls this action over HTTPS at `POST https://tzcloud.dev.turnzero.ai/v1/check_deploy`, with a bearer credential and the action's payload as the JSON body. It also accepts `GET`. An MCP connection lists this action as the tool `tzcloud_check_deploy`.

OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts ([Sign-in, sessions, and tokens](/cloud/concepts/sign-in-sessions-and-tokens/)).

**Build metadata:** Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

## Contract description

An optional check for platform deploy refusals\. It checks state without reading code or writing anything\. In `detail` order, code checks use `without_command` \(`deploy_files`, `check_only: true` and your files\) or the command from your app folder\. It follows `submit_manifest` and is recommended before a first deploy or after fixes\. The command stops before reading on Node\.js below 24\. It runs unchanged without another npx, with Node\.js 24 or later first on PATH\. Installing or updating needs approval \(/cloud/getting\-started/prerequisites/\)\. `last_release` gives the target's serving version and outcome, health, smoke, errors since and schedules' `last_run` and `next_due`\. It uses platform records, without app requests or console\. It is null if no version serves\. Clear `refusals` in order using each `next`\. An empty list with `zip_checked: false` clears state, never code\. Tell the person the route and why\.

## More about this action

The call runs the deploy's own checks of the application's state, in the deploy's order, up to the point where a deploy's start would first write anything\. It runs them through the same code the start runs\. A problem with the application, the manifest, or the environment, or a deletion in flight, refuses the call itself, as it refuses a deploy's start\. Each later check that does not read the zip returns its refusal as an entry of `refusals` instead\. The entries cover a deploy in flight, the database, a missing secret, the daily deploy cap, halted production, and the hosting cell's room\. A deploy, promote, or other act in flight is returned as `deploy_in_flight` whatever the zip, because the call passes no hash\. Its detail says which act is in flight, and for a deploy it adds that the deploy line is refused until that deploy ends\.

A check that depends on what an earlier, refused check would have accepted is left out\. The call writes no version\-history row, counts no deploy, spends no grant, and ends no halt\.

An empty `credentials_missing` or `provider_credentials_missing` list can mean the check could not read the records\. Treat an empty list alone as inconclusive\.

The answer's `first_deploy` is true where the target environment serves no version\. For a server's first deploy, the command checks the health path; a serverless application has no health\-path check\. Its `recorded_health_path` is the recorded manifest's health path, whole\. The `command` member runs the turnzero command's `check` for the application\. It is built as the deploy line is, with `--path` where the call passed `local_path`, and `command_windows` is its Windows form\. `command_npx` and `command_npx_windows` are its npx forms; the answer's `detail` states which route to try first\. The command reads its credential and origin as `deploy` does, builds the zip `deploy` builds, and prints the zip line\. It then makes one `check_deploy` call, sending no byte of the zip and no hash\.

The command's zip checks run on your computer\. A function cannot use a child process or thread\. Check the application's needs against skill:deploy's kind rule and proved\-packages list; this call refuses no unproved package\.

For a serverless zip, use client/, functions/ or both with the manifest, and optional package\.json, lib/ and migrations/\. The command's local check checks layout\. To run the deploy start's checks on the zip at the platform, use deploy\_files with check\_only and your files\. That route also refuses a native module file under functions/ or lib/, or more function files than the limit\. These two refusals inspect the zip's entries, without building or running the code\. The command chooses the checks by the answer's `kind`, `server` or `serverless`, or by the zip's layout if an older answer carries no `kind`\.

The command runs the deploy's checks of the artifact on the zip: `artifact_unreadable`, `artifact_layout_invalid`, and, for a server where `first_deploy` is true, `health_path_unserved`, a `recorded_health_path` that no source file mentions\. It prints the other lines `deploy` prints, and one `refused:` line for each refusal the call returned or the command found\. Where the zip's manifest\.json gives another health path, it prints a line that mentions `submit_manifest`\. Its last line starts with `checked:` and counts them\. It exits 0 where nothing would be refused, 1 where something would, and 3 where nothing was checked\. Run only a check line your own call returned in this session, or one you composed for your folder with its application id, as for the deploy line\.

`deploy_files` with `check_only` checks the files without a command\. It is also the route when no command form can run or connect\. The answer's `without_command` is that call for the application with `check_only` true: add your files and make it\. For a minted\-token connection or a session with no live authorized computer's token, `detail` opens with that check; a session with an authorized computer's token keeps its command line first\. This file check can keep accepted files even if a later check refuses the request\. The daily cleanup can remove them after a day, unless a serving or deploying version still uses them\.

On a hosted connector's session the answer carries no line\. Such a session's client registers only `https` redirects, each on a host that is not a loopback address, as a chat service's connector does\. There `command` and its three other forms are left out, and `detail` gives the `without_command` call where it would say to run `command_npx`\. Its `fallback` gives the action a tool with no command deploys through: `deploy_files` in every answer\.

The call takes no `environment` argument and reports the deploy target it checks, which is production for an application with one environment or development for one with two\.

The `local_path` argument: left out, the command checks the folder it runs in; the platform never reads the path\.

The npx form is `npx --no-update-notifier -y turnzero@<tag> check --application <id>`, with tag `latest` on production and `next` elsewhere, needing no install\. Run it from the application's folder or the folder `local_path` is relative to\. The installed `turnzero check --origin https://dev.turnzero.ai --application <id>` does the same where `turnzero --version` responds\. If your tool's permissions blocked the command, tell the person which route you took\.

## Access and action metadata

```json
{
  "name": "check_deploy",
  "resource": "environment",
  "tier": "observe",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "summary": "Check a deploy before making it: pass the application, and the call returns each refusal a deploy's start would make now, writing nothing. The call takes no `environment` argument and reports the deploy target it checks. Call it before `deploy_command`, on a first deploy and after fixing what it reports. `refusals` lists each refusal the application's state would draw, in the deploy's order: a deploy in flight, the database, a missing secret, the daily deploy cap, a halted production, or the hosting cell's room. An empty list means the application's state would refuse none; it does not clear your code. `command_npx` checks your code; `command_npx_windows` is its Windows form. `command` and `command_windows` use the installed turnzero command. This call leaves `zip_checked` false.",
  "annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "openWorldHint": true,
    "idempotentHint": true
  }
}
```

## MCP catalog entry

```json
{
  "name": "check_deploy",
  "title": "Check a deploy",
  "tier": "observe",
  "scenario": "CHI-L0-07",
  "summary": "An optional check for platform deploy refusals. It checks state without reading code or writing anything. In `detail` order, code checks use `without_command` (`deploy_files`, `check_only: true` and your files) or the command from your app folder. It follows `submit_manifest` and is recommended before a first deploy or after fixes. The command stops before reading on Node.js below 24. It runs unchanged without another npx, with Node.js 24 or later first on PATH. Installing or updating needs approval (/cloud/getting-started/prerequisites/). `last_release` gives the target's serving version and outcome, health, smoke, errors since and schedules' `last_run` and `next_due`. It uses platform records, without app requests or console. It is null if no version serves. Clear `refusals` in order using each `next`. An empty list with `zip_checked: false` clears state, never code. Tell the person the route and why.",
  "owners": [
    "API-L0-24",
    "MAPI-25",
    "PLD-L0-107",
    "PLD-L0-94"
  ]
}
```

## request

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | Type: object<br>Required fields: \["application"\] |
| /<wbr>properties/<wbr>application | Your account's application `id` from `list_applications`, not its name or label\.<br><br>Type: string |
| /<wbr>properties/<wbr>local\_path | On the check line: the application's folder or a `.zip` file, absolute or relative to where the command runs, passed as `check`'s `--path`\. Absent, it checks that folder\. A path `deploy_command`'s `local_path` refuses is refused `invalid_request`\.<br><br>Type: string<br>Minimum length: 1<br>Maximum length: 1024<br>Pattern: ^\(?:\[^"$\`%\!&amp;\\\|&lt;&gt;^\\u201c\-\\u201e\\u0000\-\\u001f\\u007f\\\\\]\|\\\\\[^"$\`%\!&amp;\\\|&lt;&gt;^\\u201c\-\\u201e\\u0000\-\\u001f\\u007f\\\\\]\)\+$ |

## response

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | 200 at once: nothing was written, started, or spent\. `refusals` holds what the application's state would draw; the zip's checks run on your computer through `command`\.<br><br>Type: object<br>Required fields: \["contract\_version","application","environment","refusals","checks","zip\_checked","kind","credentials\_missing","provider\_credentials\_missing","first\_deploy","recorded\_health\_path","last\_release","without\_command","fallback","detail","page"\] |
| /<wbr>properties/<wbr>contract\_version | Required value: 1 |
| /<wbr>properties/<wbr>reference | The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row\. Quote it when you report the call\.<br><br>Type: string<br>Pattern: ^\[0\-9a\-f\]\{10\}$ |
| /<wbr>properties/<wbr>application | The application id the call passed\.<br><br>Type: string |
| /<wbr>properties/<wbr>environment | The environment a deploy would target now: production on an application with one environment, development on one with two\.<br><br>Type: string |
| /<wbr>properties/<wbr>refusals | Each refusal a deploy's start would make now on the application's state, the platform side alone, in the deploy's order\. Empty where none would; a later deploy reads every check again\.<br><br>Type: array |
| /<wbr>properties/<wbr>refusals/<wbr>items | Type: object<br>Required fields: \["error","status","detail"\] |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>error | The refusal's name, a row of `schemas/wire_errors.json`\.<br><br>Type: string |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>status | The status the deploy would refuse it with\.<br><br>Type: integer |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>detail | The refusal's detail, within a refusal's budget\.<br><br>Type: string |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>next | Present where the refusal gives its remedy's one exact call, as the refusal's own body carries it: for `setting_secret_missing`, the `store_secret` call for the application and the environment a deploy would target, with no value\. Absent otherwise\.<br><br>Type: object<br>Required fields: \["action","arguments"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>next/<wbr>properties/<wbr>action | Type: string |
| /<wbr>properties/<wbr>refusals/<wbr>items/<wbr>properties/<wbr>next/<wbr>properties/<wbr>arguments | Type: object |
| /<wbr>properties/<wbr>checks | The results of the platform and file checks\. Your code is checked by `command`, or, where it cannot run, by `deploy_files` with `check_only`\. Skipping the file check loses only early warning of code a deploy would refuse\.<br><br>Type: object<br>Required fields: \["platform\_readiness","files"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>checks/<wbr>properties/<wbr>platform\_readiness | `passed` where `refusals` is empty, otherwise `refused`\.<br><br>Type: string<br>Allowed values: \["passed","refused"\] |
| /<wbr>properties/<wbr>checks/<wbr>properties/<wbr>files | `not_checked` in every answer\. This action reads no zip\.<br><br>Type: string<br>Allowed values: \["not\_checked"\] |
| /<wbr>properties/<wbr>zip\_checked | False in every answer because this action reads no zip\.<br><br>Type: boolean |
| /<wbr>properties/<wbr>kind | The application's kind\. The command runs the zip's checks for this kind\.<br><br>Type: string<br>Allowed values: \["server","serverless"\] |
| /<wbr>properties/<wbr>credentials\_missing | Each upstream whose key the target environment reads at neither its own scope of the application nor the account scope, by name\. The list can also be empty if the check could not read the records\. A deploy is not refused for it: it serves, the gateway refusing that upstream's calls `credential_not_in_custody` until `store_secret` stores the key, and its version row lists the same entries in `outcome.credentials_missing`\.<br><br>Type: array |
| /<wbr>properties/<wbr>credentials\_missing/<wbr>items | Type: object<br>Required fields: \["upstream","credential\_name"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>credentials\_missing/<wbr>items/<wbr>properties/<wbr>upstream | The upstream's name\.<br><br>Type: string |
| /<wbr>properties/<wbr>credentials\_missing/<wbr>items/<wbr>properties/<wbr>credential\_name | The stored name of the upstream's key\.<br><br>Type: string |
| /<wbr>properties/<wbr>provider\_credentials\_missing | Each credential the recorded manifest's `realm` member or push entry refers to that the target environment's provider cannot read\. The list can also be empty if the check could not read the records\. A deploy is not refused for it: it serves, the sign\-in method's sign\-ins failing and the push provider's deliveries ending `credential_unreadable` until `store_secret` stores the credential at that environment's scope of the application, and its version row lists the same entries in `outcome.provider_credentials_missing`\. A sign\-in credential, `entra`, `oidc` or `apple`, then moves into place at the manifest's next submission, and stays listed until then\.<br><br>Type: array |
| /<wbr>properties/<wbr>provider\_credentials\_missing/<wbr>items | Type: object<br>Required fields: \["provider","credential\_name"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>provider\_credentials\_missing/<wbr>items/<wbr>properties/<wbr>provider | The provider the credential serves: a sign\-in method, `entra`, `oidc` or `apple`, or a push provider, `apns` or `fcm`\.<br><br>Type: string<br>Allowed values: \["entra","oidc","apple","apns","fcm"\] |
| /<wbr>properties/<wbr>provider\_credentials\_missing/<wbr>items/<wbr>properties/<wbr>credential\_name | The credential's stored name\.<br><br>Type: string |
| /<wbr>properties/<wbr>first\_deploy | True where the target environment serves no version\. For a server, the start would read the zip for the health path and `command` checks it; a static site has no health\-path check\.<br><br>Type: boolean |
| /<wbr>properties/<wbr>recorded\_health\_path | The recorded manifest's health path, whole and never cut, which `command` reads the zip for on a server where `first_deploy` is true; the preparing answer carries the same fact under the same name\.<br><br>Type: string |
| /<wbr>properties/<wbr>last\_release | What the version the target environment serves did since it began serving, composed from reads the platform already makes, with no request to the application\. It is null where `first_deploy` is true, and `unread` with its reason where the serving version's own read fails or passes its bound\. A part whose read fails or passes its bound holds `unread` and the reason in its value's place, and never fails the call\. The member holds at most 4,096 code points of JSON text, `newest` trimmed first, then `schedules` from its end\.<br><br>Type: \["object","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>anyOf/<wbr>0 | Required fields: \["version","ended\_at","outcome","health","smoke","server\_errors\_since","log\_errors\_since","usage"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>anyOf/<wbr>1 | $ref: \#/shapes/LastReleaseUnread |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>version | The serving version's number\.<br><br>Type: integer |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>ended\_at | When the serving version's deploy ended, as its row records it\.<br><br>Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>outcome | The serving version's outcome, as the deploy member of `read_status` gives it, opening with `result`\.<br><br>Type: \["object","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>health | Whether the row passed the health gate, and its step's start and end\. Null where the row entered no health gate and its outcome holds no `gate` record, as on a row written before its step list\. The gate's own record, where one was kept, is in `outcome` alone\.<br><br>Type: \["object","null"\]<br>Required fields: \["passed","started\_at","ended\_at"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>health/<wbr>properties/<wbr>passed | Type: boolean |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>health/<wbr>properties/<wbr>started\_at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>health/<wbr>properties/<wbr>ended\_at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>smoke | The smoke check in `health`'s form, its own record in `outcome` alone\. Null where the row entered no smoke check: the manifest listed no smoke path, or the act runs none\.<br><br>Type: \["object","null"\]<br>Required fields: \["passed","started\_at","ended\_at"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>smoke/<wbr>properties/<wbr>passed | Type: boolean |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>smoke/<wbr>properties/<wbr>started\_at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>smoke/<wbr>properties/<wbr>ended\_at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since | The router's 5xx responses as `read_status`'s `server_errors` member counts them: `count`, counted from `since`, the later of the release's end \(`ended_at`\) and seven days before the read, and capped at 500, `capped` true where the cap was met, the count then a floor\. It covers only the routes requested in that time, so a route nobody requested counts nothing\. A route listed in the manifest's `smoke_paths` is checked before each deploy and promote switches, and that check is not in this count\.<br><br> |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since/<wbr>oneOf/<wbr>0 | Type: object<br>Required fields: \["count","since","capped"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>count | Type: integer<br>Minimum: 0<br>Maximum: 500 |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>since | Type: string |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>capped | Type: boolean |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>server\_errors\_since/<wbr>oneOf/<wbr>1 | $ref: \#/shapes/LastReleaseUnread |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since | The application's own log entries at `error` since `ended_at`, `count` at most the store's read ceiling \(1,000\), and `newest` at most the three newest, newest first, each its first line cut to 200 code points\.<br><br> |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since/<wbr>oneOf/<wbr>0 | Type: object<br>Required fields: \["count","newest"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>count | Type: integer<br>Minimum: 0 |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>newest | Type: array<br>Maximum items: 3 |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>newest/<wbr>items | Type: string<br>Maximum length: 200 |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>log\_errors\_since/<wbr>oneOf/<wbr>1 | $ref: \#/shapes/LastReleaseUnread |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>usage | The usage reading's freshness: `checked_at`, the last usage check's stamp, from the application's row where it holds one, else as `read_usage` gives it\.<br><br> |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>usage/<wbr>oneOf/<wbr>0 | Type: object<br>Required fields: \["checked\_at"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>usage/<wbr>oneOf/<wbr>0/<wbr>properties/<wbr>checked\_at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>usage/<wbr>oneOf/<wbr>1 | $ref: \#/shapes/LastReleaseUnread |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules | Present where the recorded manifest declares schedules\. A list gives up to twenty schedules with their `name`, their last run's `outcome` and time, and their `next_due` as `read_schedules` gives them\.<br><br> |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0 | Type: array<br>Maximum items: 20 |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items | Type: object<br>Required fields: \["name","last\_run","next\_due"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items/<wbr>properties/<wbr>name | Type: string |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items/<wbr>properties/<wbr>last\_run | Type: \["object","null"\]<br>Required fields: \["outcome","at"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items/<wbr>properties/<wbr>last\_run/<wbr>properties/<wbr>outcome | Type: string |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items/<wbr>properties/<wbr>last\_run/<wbr>properties/<wbr>at | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>0/<wbr>items/<wbr>properties/<wbr>next\_due | Type: \["string","null"\] |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules/<wbr>oneOf/<wbr>1 | $ref: \#/shapes/LastReleaseUnread |
| /<wbr>properties/<wbr>last\_release/<wbr>properties/<wbr>schedules\_total | The number of schedules in the target environment when the list was read\. Present when `schedules` is a list\. If the count exceeds the list length, call `read_schedules` with the same `environment` for the full list\.<br><br>Type: integer<br>Minimum: 0 |
| /<wbr>properties/<wbr>smoke\_notice | Notice of route checks before a deploy or promote switches, present only for servers with no `smoke_paths` in their recorded manifest\.<br><br>Type: string |
| /<wbr>properties/<wbr>without\_command | The call a tool that cannot run the line makes to check its code instead: with no shell, `command_npx` refused and the command not installed \(`turnzero --version` does not respond\), or no connection\. It is `deploy_files` with `check_only` true for the application, in `next`'s form\. Add `files`, the complete list as `deploy_files` reads it, with a file too large for the list's call sent first as `file`\. The call whose list leaves nothing `missing` runs every check a deploy makes before it starts, and starts nothing\.<br><br>Type: object<br>Required fields: \["action","arguments"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>without\_command/<wbr>properties/<wbr>action | Allowed values: \["deploy\_files","tzcloud\_deploy\_files"\] |
| /<wbr>properties/<wbr>without\_command/<wbr>properties/<wbr>arguments | Type: object<br>Required fields: \["application","check\_only"\]<br>Additional properties: false |
| /<wbr>properties/<wbr>without\_command/<wbr>properties/<wbr>arguments/<wbr>properties/<wbr>application | Type: string |
| /<wbr>properties/<wbr>without\_command/<wbr>properties/<wbr>arguments/<wbr>properties/<wbr>check\_only | Required value: true |
| /<wbr>properties/<wbr>fallback | Always present: the action for a tool that cannot run a command, `deploy_files` on the wire and `tzcloud_deploy_files` over MCP; never null\. For a minted token or a session with no authorized computer, `detail` opens with the `without_command` check and its state\. A returned command follows, with its shell and credential conditions\. A session with an authorized computer gets the command\-first form where a line is returned\. A tool that uses `deploy_files` tells the person why\.<br><br>Type: \["string","null"\]<br>Allowed values: \["deploy\_files","tzcloud\_deploy\_files",null\] |
| /<wbr>properties/<wbr>command | One line running the installed turnzero command's `check` with the application, bare, composed as the deploy line is, with `--path` where the call passed `local_path`\. A tool runs `command_npx`, its npx form, first, and this line where npx cannot run and `turnzero --version` responds\. Run it through your shell tool on Node\.js 24 or later, from the application's folder or, where the call passed `local_path`, from the folder that path is relative to\. It uploads nothing\. Left out on a hosted connector's session, a client whose every registered redirect is an `https` address on a host that is not a loopback address, as a chat service's connector registers\.<br><br>Type: string |
| /<wbr>properties/<wbr>command\_windows | The same line in its Windows form\. Left out on a hosted connector's session, as `command` is\.<br><br>Type: string |
| /<wbr>properties/<wbr>command\_npx | The same line run through npx, `npx --no-update-notifier -y turnzero@<tag>` in place of `turnzero`, the tag `latest` on production's platform and `next` on every other\. Use Node\.js 24 or later\. Use `read_documentation` with page `/cloud/getting-started/prerequisites/` for ways to put Node\.js 24 first on PATH\. Run this line first, or `command_npx_windows` on Windows; it runs whether or not the command is installed\. If npx can't run, use `command` where `turnzero --version` responds; else use the answer's `without_command` call, `deploy_files` with `check_only`\. Run `npm install -g turnzero@<tag>` only if the person wants to keep it\. If your tool's permissions blocked the command, tell the person which route you took\. A person or a job may run any of the four forms\. Left out on a hosted connector's session, as `command` is\.<br><br>Type: string |
| /<wbr>properties/<wbr>command\_npx\_windows | `command_npx`'s line for every Windows shell, with `npx.cmd` where its head says `npx`\. Left out on a hosted connector's session, as `command` is\.<br><br>Type: string |
| /<wbr>properties/<wbr>detail | `detail` reports whether a deploy would be refused now and says that this call checked no code\. Where `refusals` is empty, it says that the platform side would refuse nothing; that clause leaves where the budget asks\. Otherwise it points to `refusals`\. Every form closes on the ways\-to\-deploy pointer and opens with no version check\.<br><br>On a minted\-token answer or a session with no live authorized computer's token, it opens with the `without_command` check, `deploy_files` with `check_only`, with the caller's folder files added\. It says that the check deploys nothing\. The command alternative follows\. A session uses a signed\-in computer\. A minted\-token caller uses the existing `TURNZERO_CLOUD_MINTED_TOKEN` if set\. If unset, the caller sets it to this connection's token outside commands\. Sign\-in is needed if the caller uses `mint_token`\.<br><br>A session's first run without the computer's sign\-in prints the sign\-in path; signing in to this connection authorizes no computer\. Where an authorized computer's token exists, the session's command line stays first, with its other\-computer sentence\. Only that line\-first form points to `command_npx` to check the code, or after the refusals are cleared\. `command_npx_windows` joins only where room remains once every other part is in place\.<br><br>The folder, result and ways\-to\-deploy pointer stay whole\. A minted\-token answer over 600 code points may use shorter wording, preserving every token and origin precondition\. The line's `--origin` may give the origin\. On a hosted connector's session, no command member is carried: the `without_command` check stays, no sentence tells the tool to run `command_npx`, and the install sentence omits `command_npx`\.<br><br>Type: string |
| /<wbr>properties/<wbr>page | The reference page's address on the origin that responded, ending /cloud/reference/actions/check\-deploy/, which `read_documentation` reads as `page`\.<br><br>Type: string |

## Complete payload contract

```json
{
  "request": {
    "type": "object",
    "required": [
      "application"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "local_path": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024,
        "pattern": "^(?:[^\"$`%!&\\|<>^\\u201c-\\u201e\\u0000-\\u001f\\u007f\\\\]|\\\\[^\"$`%!&\\|<>^\\u201c-\\u201e\\u0000-\\u001f\\u007f\\\\])+$",
        "description": "On the check line: the application's folder or a `.zip` file, absolute or relative to where the command runs, passed as `check`'s `--path`. Absent, it checks that folder. A path `deploy_command`'s `local_path` refuses is refused `invalid_request`."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "application",
      "environment",
      "refusals",
      "checks",
      "zip_checked",
      "kind",
      "credentials_missing",
      "provider_credentials_missing",
      "first_deploy",
      "recorded_health_path",
      "last_release",
      "without_command",
      "fallback",
      "detail",
      "page"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
      },
      "application": {
        "type": "string",
        "description": "The application id the call passed."
      },
      "environment": {
        "type": "string",
        "description": "The environment a deploy would target now: production on an application with one environment, development on one with two (PLD-L0-96)."
      },
      "refusals": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "error",
            "status",
            "detail"
          ],
          "properties": {
            "error": {
              "type": "string",
              "description": "The refusal's name, a row of `schemas/wire_errors.json` (MAPI-15)."
            },
            "status": {
              "type": "integer",
              "description": "The status the deploy would refuse it with."
            },
            "detail": {
              "type": "string",
              "description": "The refusal's detail, within a refusal's budget (MCP-12)."
            },
            "next": {
              "type": "object",
              "required": [
                "action",
                "arguments"
              ],
              "properties": {
                "action": {
                  "type": "string"
                },
                "arguments": {
                  "type": "object"
                }
              },
              "additionalProperties": false,
              "description": "Present where the refusal gives its remedy's one exact call, as the refusal's own body carries it (MAPI-24): for `setting_secret_missing`, the `store_secret` call for the application and the environment a deploy would target, with no value. Absent otherwise."
            }
          }
        },
        "description": "Each refusal a deploy's start would make now on the application's state, the platform side alone, in the deploy's order. Empty where none would; a later deploy reads every check again."
      },
      "checks": {
        "type": "object",
        "required": [
          "platform_readiness",
          "files"
        ],
        "properties": {
          "platform_readiness": {
            "type": "string",
            "enum": [
              "passed",
              "refused"
            ],
            "description": "`passed` where `refusals` is empty, otherwise `refused`."
          },
          "files": {
            "type": "string",
            "enum": [
              "not_checked"
            ],
            "description": "`not_checked` in every answer. This action reads no zip."
          }
        },
        "additionalProperties": false,
        "description": "The results of the platform and file checks. Your code is checked by `command`, or, where it cannot run, by `deploy_files` with `check_only`. Skipping the file check loses only early warning of code a deploy would refuse."
      },
      "zip_checked": {
        "type": "boolean",
        "description": "False in every answer because this action reads no zip."
      },
      "kind": {
        "type": "string",
        "enum": [
          "server",
          "serverless"
        ],
        "description": "The application's kind. The command runs the zip's checks for this kind."
      },
      "credentials_missing": {
        "type": "array",
        "description": "Each upstream whose key the target environment reads at neither its own scope of the application nor the account scope, by name. The list can also be empty if the check could not read the records. A deploy is not refused for it: it serves, the gateway refusing that upstream's calls `credential_not_in_custody` until `store_secret` stores the key, and its version row lists the same entries in `outcome.credentials_missing` (EGW-L0-02; PLD-L0-107).",
        "items": {
          "type": "object",
          "required": [
            "upstream",
            "credential_name"
          ],
          "properties": {
            "upstream": {
              "type": "string",
              "description": "The upstream's name."
            },
            "credential_name": {
              "type": "string",
              "description": "The stored name of the upstream's key."
            }
          },
          "additionalProperties": false
        }
      },
      "provider_credentials_missing": {
        "type": "array",
        "description": "Each credential the recorded manifest's `realm` member or push entry refers to that the target environment's provider cannot read. The list can also be empty if the check could not read the records. A deploy is not refused for it: it serves, the sign-in method's sign-ins failing and the push provider's deliveries ending `credential_unreadable` until `store_secret` stores the credential at that environment's scope of the application, and its version row lists the same entries in `outcome.provider_credentials_missing`. A sign-in credential, `entra`, `oidc` or `apple`, then moves into place at the manifest's next submission, and stays listed until then (ACS-L0-09; PSH-L0-01; PLD-L0-107).",
        "items": {
          "type": "object",
          "required": [
            "provider",
            "credential_name"
          ],
          "properties": {
            "provider": {
              "type": "string",
              "enum": [
                "entra",
                "oidc",
                "apple",
                "apns",
                "fcm"
              ],
              "description": "The provider the credential serves: a sign-in method, `entra`, `oidc` or `apple`, or a push provider, `apns` or `fcm`."
            },
            "credential_name": {
              "type": "string",
              "description": "The credential's stored name."
            }
          },
          "additionalProperties": false
        }
      },
      "first_deploy": {
        "type": "boolean",
        "description": "True where the target environment serves no version. For a server, the start would read the zip for the health path and `command` checks it; a static site has no health-path check (PLD-L0-107)."
      },
      "recorded_health_path": {
        "type": "string",
        "description": "The recorded manifest's health path, whole and never cut, which `command` reads the zip for on a server where `first_deploy` is true; the preparing answer carries the same fact under the same name (PLD-L0-107; PLD-L0-86)."
      },
      "last_release": {
        "type": [
          "object",
          "null"
        ],
        "anyOf": [
          {
            "required": [
              "version",
              "ended_at",
              "outcome",
              "health",
              "smoke",
              "server_errors_since",
              "log_errors_since",
              "usage"
            ]
          },
          {
            "$ref": "#/shapes/LastReleaseUnread"
          }
        ],
        "properties": {
          "version": {
            "type": "integer",
            "description": "The serving version's number."
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the serving version's deploy ended, as its row records it."
          },
          "outcome": {
            "type": [
              "object",
              "null"
            ],
            "description": "The serving version's outcome, as the deploy member of `read_status` gives it, opening with `result`."
          },
          "health": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "passed",
              "started_at",
              "ended_at"
            ],
            "properties": {
              "passed": {
                "type": "boolean"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Whether the row passed the health gate, and its step's start and end. Null where the row entered no health gate and its outcome holds no `gate` record, as on a row written before its step list. The gate's own record, where one was kept, is in `outcome` alone (PLD-L0-59; PLD-L0-89)."
          },
          "smoke": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "passed",
              "started_at",
              "ended_at"
            ],
            "properties": {
              "passed": {
                "type": "boolean"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "The smoke check in `health`'s form, its own record in `outcome` alone. Null where the row entered no smoke check: the manifest listed no smoke path, or the act runs none."
          },
          "server_errors_since": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "count",
                  "since",
                  "capped"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 500
                  },
                  "since": {
                    "type": "string"
                  },
                  "capped": {
                    "type": "boolean"
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The router's 5xx responses as `read_status`'s `server_errors` member counts them: `count`, counted from `since`, the later of the release's end (`ended_at`) and seven days before the read, and capped at 500, `capped` true where the cap was met, the count then a floor. It covers only the routes requested in that time, so a route nobody requested counts nothing. A route listed in the manifest's `smoke_paths` is checked before each deploy and promote switches, and that check is not in this count."
          },
          "log_errors_since": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "count",
                  "newest"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "newest": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    }
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The application's own log entries at `error` since `ended_at`, `count` at most the store's read ceiling (1,000), and `newest` at most the three newest, newest first, each its first line cut to 200 code points."
          },
          "usage": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "checked_at"
                ],
                "properties": {
                  "checked_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The usage reading's freshness: `checked_at`, the last usage check's stamp, from the application's row where it holds one, else as `read_usage` gives it."
          },
          "schedules": {
            "oneOf": [
              {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "last_run",
                    "next_due"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "last_run": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "outcome",
                        "at"
                      ],
                      "properties": {
                        "outcome": {
                          "type": "string"
                        },
                        "at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "next_due": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "Present where the recorded manifest declares schedules. A list gives up to twenty schedules with their `name`, their last run's `outcome` and time, and their `next_due` as `read_schedules` gives them."
          },
          "schedules_total": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of schedules in the target environment when the list was read. Present when `schedules` is a list. If the count exceeds the list length, call `read_schedules` with the same `environment` for the full list."
          }
        },
        "description": "What the version the target environment serves did since it began serving, composed from reads the platform already makes, with no request to the application. It is null where `first_deploy` is true, and `unread` with its reason where the serving version's own read fails or passes its bound. A part whose read fails or passes its bound holds `unread` and the reason in its value's place, and never fails the call. The member holds at most 4,096 code points of JSON text, `newest` trimmed first, then `schedules` from its end (PLD-L0-107)."
      },
      "smoke_notice": {
        "type": "string",
        "description": "Notice of route checks before a deploy or promote switches, present only for servers with no `smoke_paths` in their recorded manifest."
      },
      "without_command": {
        "type": "object",
        "required": [
          "action",
          "arguments"
        ],
        "properties": {
          "action": {
            "enum": [
              "deploy_files",
              "tzcloud_deploy_files"
            ]
          },
          "arguments": {
            "type": "object",
            "required": [
              "application",
              "check_only"
            ],
            "properties": {
              "application": {
                "type": "string"
              },
              "check_only": {
                "const": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "description": "The call a tool that cannot run the line makes to check its code instead: with no shell, `command_npx` refused and the command not installed (`turnzero --version` does not respond), or no connection. It is `deploy_files` with `check_only` true for the application, in `next`'s form. Add `files`, the complete list as `deploy_files` reads it, with a file too large for the list's call sent first as `file`. The call whose list leaves nothing `missing` runs every check a deploy makes before it starts, and starts nothing (PLD-L0-107; MAPI-24; MAPI-26)."
      },
      "fallback": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "deploy_files",
          "tzcloud_deploy_files",
          null
        ],
        "description": "Always present: the action for a tool that cannot run a command, `deploy_files` on the wire and `tzcloud_deploy_files` over MCP; never null. For a minted token or a session with no authorized computer, `detail` opens with the `without_command` check and its state. A returned command follows, with its shell and credential conditions. A session with an authorized computer gets the command-first form where a line is returned. A tool that uses `deploy_files` tells the person why."
      },
      "command": {
        "type": "string",
        "description": "One line running the installed turnzero command's `check` with the application, bare, composed as the deploy line is, with `--path` where the call passed `local_path`. A tool runs `command_npx`, its npx form, first, and this line where npx cannot run and `turnzero --version` responds. Run it through your shell tool on Node.js 24 or later, from the application's folder or, where the call passed `local_path`, from the folder that path is relative to. It uploads nothing (PLD-L0-94). Left out on a hosted connector's session, a client whose every registered redirect is an `https` address on a host that is not a loopback address, as a chat service's connector registers (PLD-L0-107)."
      },
      "command_windows": {
        "type": "string",
        "description": "The same line in its Windows form (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "command_npx": {
        "type": "string",
        "description": "The same line run through npx, `npx --no-update-notifier -y turnzero@<tag>` in place of `turnzero`, the tag `latest` on production's platform and `next` on every other. Use Node.js 24 or later. Use `read_documentation` with page `/cloud/getting-started/prerequisites/` for ways to put Node.js 24 first on PATH. Run this line first, or `command_npx_windows` on Windows; it runs whether or not the command is installed. If npx can't run, use `command` where `turnzero --version` responds; else use the answer's `without_command` call, `deploy_files` with `check_only`. Run `npm install -g turnzero@<tag>` only if the person wants to keep it. If your tool's permissions blocked the command, tell the person which route you took. A person or a job may run any of the four forms (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "command_npx_windows": {
        "type": "string",
        "description": "`command_npx`'s line for every Windows shell, with `npx.cmd` where its head says `npx` (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "detail": {
        "type": "string",
        "description": "`detail` reports whether a deploy would be refused now and says that this call checked no code. Where `refusals` is empty, it says that the platform side would refuse nothing; that clause leaves where the budget asks. Otherwise it points to `refusals`. Every form closes on the ways-to-deploy pointer and opens with no version check.\n\nOn a minted-token answer or a session with no live authorized computer's token, it opens with the `without_command` check, `deploy_files` with `check_only`, with the caller's folder files added. It says that the check deploys nothing. The command alternative follows. A session uses a signed-in computer. A minted-token caller uses the existing `TURNZERO_CLOUD_MINTED_TOKEN` if set. If unset, the caller sets it to this connection's token outside commands. Sign-in is needed if the caller uses `mint_token`.\n\nA session's first run without the computer's sign-in prints the sign-in path; signing in to this connection authorizes no computer. Where an authorized computer's token exists, the session's command line stays first, with its other-computer sentence. Only that line-first form points to `command_npx` to check the code, or after the refusals are cleared. `command_npx_windows` joins only where room remains once every other part is in place.\n\nThe folder, result and ways-to-deploy pointer stay whole. A minted-token answer over 600 code points may use shorter wording, preserving every token and origin precondition. The line's `--origin` may give the origin. On a hosted connector's session, no command member is carried: the `without_command` check stays, no sentence tells the tool to run `command_npx`, and the install sentence omits `command_npx`."
      },
      "page": {
        "type": "string",
        "description": "The reference page's address on the origin that responded, ending /cloud/reference/actions/check-deploy/, which `read_documentation` reads as `page`."
      }
    },
    "description": "200 at once: nothing was written, started, or spent. `refusals` holds what the application's state would draw; the zip's checks run on your computer through `command` (API-L0-24; PLD-L0-107)."
  }
}
```

## Shared contracts

- [Refusals](/cloud/reference/refusals/): every refusal, by surface, with its cause and its remedy
- [schemas/wire\_error\.schema\.json](/cloud/reference/sources/schemas/wire-error-schema/)
- [schemas/wire\_errors\.json](/cloud/reference/sources/schemas/wire-errors/)
- [schemas/action\_payloads\.json](/cloud/reference/sources/schemas/action-payloads/) (includes shared shapes)
- [management\_api\_contract\.md](/cloud/reference/sources/management-api-contract/)
