---
title: "PUT /sites/{site_id}/deploys/{deploy_id}"
method: PUT
path: "/sites/{site_id}/deploys/{deploy_id}"
tags: ["deploy"]
---

# PUT /sites/{site_id}/deploys/{deploy_id}

`PUT /sites/{site_id}/deploys/{deploy_id}`

## Path parameters

- `site_id` string, required
- `deploy_id` string, required

## Query parameters

- `commit_ref` string

## Request body

- DeployFiles — Deploy files can be provided in two ways: 1. As a JSON object using 'files' (a hash mapping file paths to SHA1 digests), OR 2. As a zip file using one of these methods: - Set Content-Type to 'application/zip' and send the zip file as the raw request body - Include the zip file content in the 'zip' field of this JSON object with Content-Type 'application/json'
  - `files` object — A hash mapping file paths to SHA1 digests of the file contents.
  - `zip` string, binary — A zip file containing the site files to deploy. Alternative to 'files'. To use this field, set Content-Type to 'application/json' and include the zip content here. Alternatively, you can set Content-Type to 'application/zip' and send the zip as the raw request body (not as JSON).
  - `draft` boolean
  - `async` boolean
  - `functions` object
  - `edge_functions` object — A hash mapping edge-function bundle formats to the code_sha of each bundle. The response's required_edge_functions lists which of these still need to be uploaded.
  - `function_schedules` FunctionSchedule[]
    - `name` string
    - `cron` string
  - `functions_config` object
  - `branch` string
  - `framework` string
  - `framework_version` string
  - `environment` DeployEnvironmentVariable[] — A list of deploy-specific environment variable data. Data specified this way applies only to this specific deploy and is merged into any existing environment variables set on the account and site. Deploy-specific environment variable data takes precedence over account and site environment variable data: For example, a deploy-specific variable with the key `NODE_ENV` will take priority over any existing site- and account-level environment variable data with the key `NODE_ENV`. Environment variable data may be provided at one of two times: - When creating a new Deploy with deploy files (most common) - When finalizing an existing Deploy with deploy files Once set, environment variables for a specific deploy cannot be modified. Subsequent attempts to modify environment variable data for a deploy will be ignored.
    - `key` string, required
    - `value` string, required
    - `is_secret` boolean, required
    - `scopes` string[], required

## Response `200`

OK

- Deploy
  - `id` string
  - `site_id` string
  - `user_id` string
  - `build_id` string
  - `state` string
  - `name` string
  - `url` string
  - `ssl_url` string
  - `admin_url` string
  - `deploy_url` string
  - `deploy_ssl_url` string
  - `screenshot_url` string
  - `review_id` number
  - `draft` boolean
  - `required` string[]
  - `required_functions` string[]
  - `required_edge_functions` string[] — An array of code_shas for the edge-function bundles that need to be uploaded to complete the deploy.
  - `error_message` string
  - `branch` string
  - `commit_ref` string
  - `commit_url` string
  - `skipped` boolean
  - `created_at` string, dateTime
  - `updated_at` string, dateTime
  - `published_at` string, dateTime
  - `title` string
  - `context` string
  - `locked` boolean
  - `review_url` string
  - `framework` string
  - `skew_protection_token` string
  - `function_schedules` FunctionSchedule[]
    - `name` string
    - `cron` string
  - `functions_region` string — The functions region for this deploy as an airport code.
  - `functions_region_overrides` object[] — Functions in the deploy that explicitly specify their own region (airport code).
    - `name` string
    - `region` string

## Other responses

- `default` — error

---

[API](https://skmtc.net/netlify/apis/netlify-s-api-documentation.md) · [All operations](https://skmtc.net/netlify/apis/netlify-s-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netlify/netlify-s-api-documentation/revisions/71540d1b5d9d/schema)
