---
title: "Update Environment"
method: PATCH
path: "/environments/{environment}"
tags: ["environments"]
---

# Update Environment

`PATCH /environments/{environment}`

## Path parameters

- `environment` string, required

## Query parameters

- `fields` object
  - `accounts` string — The comma-separated list of fields to return in response for Account resource.
  - `agent-pools` string — The comma-separated list of fields to return in response for AgentPool resource.
  - `drift-detection-schedule` string — The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
  - `environments` string — The comma-separated list of fields to return in response for Environment resource.
  - `policy-groups` string — The comma-separated list of fields to return in response for PolicyGroup resource.
  - `provider-configurations` string — The comma-separated list of fields to return in response for ProviderConfiguration resource.
  - `storage-profiles` string — The comma-separated list of fields to return in response for StorageProfile resource.
  - `tags` string — The comma-separated list of fields to return in response for Tag resource.
  - `users` string — The comma-separated list of fields to return in response for User resource.

## Response `200`

Successfully updated the environment.

## Other responses

- `404` — Environment or relationship not found, or user unauthorized to perform action.
- `422` — Invalid arguments.
- `4XX` — Client error.
- `5XX` — Server error.

---

[API](https://skmtc.net/scalr/apis/scalr-iacp-api.md) · [All operations](https://skmtc.net/scalr/apis/scalr-iacp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scalr/scalr-iacp-api/revisions/fc927526ad12/schema)
