---
title: "Modifies an existing parent environment."
method: PUT
path: "/{spaceId}/parentEnvironments/{environmentId}"
tags: ["ParentEnvironments"]
---

# Modifies an existing parent environment.

`PUT /{spaceId}/parentEnvironments/{environmentId}`

## Path parameters

- `spaceId` string, required
- `environmentId` string, required

## Request body

- ModifyParentEnvironmentCommand
  - `AutomaticDeprovisioningRule` AutomaticDeprovisioningRuleResource
    - `ExpiryDays` integer
    - `ExpiryHours` integer
  - `Description` string
  - `EnvironmentId` string, required
  - `Name` string, required
  - `Slug` string
  - `SortOrder` integer
  - `SpaceId` string, required
  - `UseGuidedFailure` boolean

## Response `200`

The parent environment after modifications have been applied.

- ModifyParentEnvironmentResponse
  - `AutomaticDeprovisioningRule` AutomaticDeprovisioningRuleResource, required
    - `ExpiryDays` integer
    - `ExpiryHours` integer
  - `Description` string
  - `Id` string, required
  - `Name` string, required
  - `Slug` string, required
  - `SortOrder` integer, required
  - `SpaceId` string, required
  - `UseGuidedFailure` boolean, required

## Other responses

- `400` — Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404` — Not found. One or more of the entities involved in the operation was not found.

---

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