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

# Update an environment

`PATCH /projects/{projectId}/environments/{environmentId}`

Update the details of a single existing environment.

## Path parameters

- `projectId` string, required
- `environmentId` string, required

## Request body

- EnvironmentPatch
  - `name` string — The name of the environment
  - `title` string — The title of the environment
  - `attributes` object — Arbitrary attributes attached to this resource
  - `type` 'development' | 'production' | 'staging' — The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated
  - `parent` string, nullable — The name of the parent environment
  - `clone_parent_on_create` boolean — Clone data when creating that environment
  - `http_access` object — The HTTP access permissions for this environment
    - `is_enabled` boolean — Whether http_access control is enabled
    - `addresses` object[]
      - `permission` 'allow' | 'deny', required
      - `address` string, required — IP address or CIDR
    - `basic_auth` object
  - `enable_smtp` boolean — Whether to configure SMTP for this environment
  - `restrict_robots` boolean — Whether to restrict robots for this environment

## Response `default`

- AcceptedResponse
  - `status` string, required — The status text of the response
  - `code` integer, required — The status code of the response

---

[API](https://skmtc.net/upsun/apis/upsun-com-rest-api.md) · [All operations](https://skmtc.net/upsun/apis/upsun-com-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/upsun/upsun-com-rest-api/revisions/6cc88fde6435/schema)
