# Update an environment and make a new version `PUT /v1/environments/{environment}` **In this build:** Real. **Scope:** `environment.write` **CLI:** `harebox env set` ## Request: `EnvironmentInput` | Field | Type | Notes | |---|---|---| | `name` (required) | `string` | | | `third_party_safe` | `boolean` | | | `include_github` | `boolean` | | | `include_api_key` | `boolean` | | | `include_agent_logins` | `boolean` | | | `credential_profile` | `string or null` | | | `allowed_members` | `array or null` | | ## Response: 200 `Environment` | Field | Type | Notes | |---|---|---| | `id` (required) | `string` | | | `name` (required) | `string` | | | `version` (required) | `integer` | | | `third_party_safe` | `boolean` | | | `effective` | `object` | What sandboxes really receive after all switches. | | `vars` | `array` | Names only. | | `secret_files` | `array` | | | `repos` | `array` | | | `credential_profile` | `string or null` | | Errors follow [one format](../errors.html).