---
title: "PATCH /experimental/environments/{id}"
method: PATCH
path: "/experimental/environments/{id}"
tags: ["Environments"]
---

# PATCH /experimental/environments/{id}

`PATCH /experimental/environments/{id}`

Merges keys into an environment's sealed value in place: the named keys are added, overwritten, or removed, and every other key keeps its current value. The value is re-sealed server-side and never returned. Use `PUT` to replace the whole value at once.

## Path parameters

- `id` string, uuid, required

## Headers

- `Authorization` string

## Request body

- object
  - `setEntries` object — Keys to add or overwrite as a `KEY=VALUE` map. Empty values are rejected; omit a key to leave it unset.
  - `removeKeys` string[] — Declared keys to remove from the sealed value.
  - `metadata` object
    - `description` string
    - `githubAccess` union — GitHub access granted to runs that use this environment. Defaults to read.
      - 'none'
      - 'read'
      - 'write'
    - `mcpServerNames` string[] — Names of workspace-registered MCP proxies to configure on this environment. Each must name an MCP server already registered and authorized in this workspace. Naming an unknown or unauthorized server is a 400.

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, uuid, required
    - `type` 'environment', required
    - `attributes` object, required
      - `name` string, required
      - `workspaceId` string, uuid, required
      - `metadata` object, nullable, required
        - `description` string
        - `envVariableNames` string[]
        - `emptyKeyNames` string[]
        - `mcpServerNames` string[]
        - `githubAccess` union
          - 'none'
          - 'read'
          - 'write'
      - `keyNames` string[], required
      - `emptyKeyNames` string[], required
      - `mcpServerNames` string[], required
      - `githubAccess` union, required
        - 'none'
        - 'read'
        - 'write'
      - `createdBy` object, nullable, required
        - `id` string, uuid, required
        - `firstName` string, nullable, required
        - `lastName` string, nullable, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-09-15** `d50a02b79ad3` — 2 info
  - added the optional property `error/code` to the response with the `403` status
  - added the optional property `error/url` to the response with the `403` status
- **2026-09-12** `ff4456b002cc` — 3 info
  - added the new optional request property `metadata/githubAccess`
  - added the optional property `data/attributes/metadata/anyOf[subschema #1]/githubAccess` to the response with the `200` status
  - added the required property `data/attributes/githubAccess` to the response with the `200` status
- **2026-09-04** `ffb03b5d287f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/tessl/apis/tessl-api/changes/experimental/environments/:id/patch.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) · [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/288d28ba107c?raw)
