v1

latestOpenAPI 3.1.02026-07-22100167210.7 KB
Environments

Update Environment

Updates a non-global environment. Only provided fields are changed. PATCH /v1/environments/global returns 400 with a pointer to the nested resource endpoints (variables, files, skills, MCPs, warm hooks) — the Global env's metadata cannot be edited directly. Source-backed personal environments cannot change repository_id, repository_set_id, or system_prompt, but may set personal_preferences, instructions appended after the inherited system prompt. Returns 409 when an automation still references the environment in a way that blocks the requested change.

patch/v1/environments/{id}

Path parameters

idstring required

Environment UUID. The literal global is rejected with 400 — see endpoint description.

Request body

namestring
descriptionstring nullable
repository_idstring uuid nullable
repository_set_idstring uuid nullable
system_promptstring nullable
mobile_testing_enabledboolean

Enable or disable mobile testing. Only valid on team environments; enabling requires a Team or Enterprise plan and otherwise returns PLAN_UPGRADE_REQUIRED.

personal_preferencesstring nullable

Only settable on personal environments. Appended after the (inherited) system prompt.

Response

Environment updated