---
title: "Updates a chain environment's settings"
method: PATCH
path: "/v1/chains/{chain_id}/environments/{env_name}"
---

# Updates a chain environment's settings

`PATCH /v1/chains/{chain_id}/environments/{env_name}`

Updates a chain environment's settings and returns the chain environment.

## Request body

- UpdateChainEnvironmentRequestV1 — A request to update a chain environment.
  - `promotion_settings` UpdatePromotionSettingsV1 — Promotion settings for model promotion
    - `redeploy_on_promotion` boolean, nullable — Whether to deploy on all promotions. Enabling this flag allows model code to safely handle environment-specific logic. When a deployment is promoted, a new deployment will be created with a copy of the image.
    - `rolling_deploy` boolean, nullable — Whether the environment should rely on rolling deploy orchestration.
    - `promotion_cleanup_strategy` 'KEEP' | 'SCALE_TO_ZERO' | 'DEACTIVATE' — The promotion cleanup strategy.
    - `rolling_deploy_config` UpdateRollingDeployConfigV1 — Rolling deploy config for promoting chains and oracles
      - `rolling_deploy_strategy` 'REPLICA' — The rolling deploy strategy.
      - `max_surge_percent` integer, nullable — The maximum surge percentage for rolling deploys.
      - `max_unavailable_percent` integer, nullable — The maximum unavailable percentage for rolling deploys.
      - `stabilization_time_seconds` integer, nullable — The stabilization time in seconds for rolling deploys.
      - `replica_overhead_percent` integer, nullable — The replica overhead percentage for rolling deploys.
    - `ramp_up_while_promoting` boolean, nullable — Whether to ramp up traffic while promoting
    - `ramp_up_duration_seconds` integer, nullable — Duration of the ramp up in seconds

## Response `200`

- UpdateChainEnvironmentResponseV1 — A response to update a chain environment.
  - `ok` boolean, required — Whether the update was successful

---

[API](https://skmtc.net/baseten/apis/baseten-inference-api.md) · [All operations](https://skmtc.net/baseten/apis/baseten-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baseten/baseten-inference-api/versions/a55a2f64c3c5/schema)
