---
title: "Update an environment"
method: PATCH
path: "/v3/environments/{environment_id}"
tags: ["Environments"]
---

# Update an environment

`PATCH /v3/environments/{environment_id}`

Updates environment metadata. Scope is immutable; sharing may only be updated on workspace-owned environments.

## Path parameters

- `environment_id` string, required

## Request body

- UpdateEnvironmentRequest
  - `display_name` string
  - `description` string
  - `sharing` Sharing — Sharing controls which projects in the workspace may use this entity and what they may do with it.
    - `all_projects` SharingAllProjects
    - `selected` SharingSelectedProjects
      - `project_ids` string[] — Projects allowed to use the entity. An empty list shares it with no project.
    - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
    - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
    - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

## Response `200`

OK

- UpdateEnvironmentResponse
  - `environment` Environment, required
    - `id` string, required — Unique environment ID in env_<ulid> form.
    - `slug` string, required — Immutable workspace-unique environment slug.
    - `display_name` string, required — Workspace-unique display name.
    - `description` string, required
    - `created_at` string, date-time, required
    - `created_by_id` string, required
    - `updated_at` string, date-time, required
    - `updated_by_id` string, required
    - `project_id` string — Project that owns this environment.
    - `sharing` Sharing — Sharing controls which projects in the workspace may use this entity and what they may do with it.
      - `all_projects` SharingAllProjects
      - `selected` SharingSelectedProjects
        - `project_ids` string[] — Projects allowed to use the entity. An empty list shares it with no project.
      - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
      - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
      - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

## Changes

> 350 revisions in range; 136 not diffed.

- **2026-09-28** `3c7d859558ee` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v3/environments/:environment_id/patch.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/orq-ai/apis/orq-ai-api/revisions/3c7d859558ee?raw)
