Begin a multi-call deploy session
begin_deployOpens a staging session for a multi-call deploy. Use when the site is too large to fit in a single deploy_site/update_site call. Pair with add_files (one or more times) OR a single tarball upload to the returned uploadUrl, then commit_deploy. Active session limit per token: 5. Default TTL: 1 hour.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | How commit_deploy will apply the staged files. 'replace' wipes the live site and atomic-renames the staged set into place. 'patch' layers staged files on top of the live site (kept files = live + staged; deletes via commit_deploy's `delete` array). | |
| name | Yes | Site name to deploy to. Must already exist; multi-call sessions don't auto-create sites — use deploy_site for that, or call this against an existing site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| siteId | Yes | ||
| status | Yes | ||
| deployId | Yes | Pass this id to add_files / commit_deploy / abort_deploy / list_deploys. | |
| siteName | Yes | ||
| expiresAt | Yes | ISO timestamp. The session will be auto-expired and the scratch dir cleaned at this time. | |
| uploadUrl | Yes | POST a tar(.gz) archive to this URL to stage many files in one HTTP call — bypasses the per-tool-call output budget that bounds add_files. The URL already embeds a single-purpose upload_token narrowly scoped to THIS staging session, so no Authorization header is needed when using it. Example: `tar -czf - -C dist . | curl --data-binary @- -H "Content-Type: application/octet-stream" "<uploadUrl>"`. After upload, call commit_deploy normally. Body limit: 100 MB (gzipped). TIP: pair with list_file_hashes BEFORE staging, so you can skip files that haven't changed. | |
| request_id | No | Server-assigned request correlation id. Quote it when contacting support. | |
| uploadToken | Yes | Same single-purpose token already embedded in uploadUrl, exposed separately if you'd rather pass it via Authorization: Bearer header than as a query parameter. Valid only for POST /upload/<this deployId>. Cannot be used for /mcp tool calls or any other deploy session. |