Skip to main content
PATCH
Update Environment

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys. User-session JWTs are not accepted by /v1/replica endpoints.

Path Parameters

id
string
required

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

Body

application/json

Request body for updating an environment. Only provided fields are changed. repository_id and repository_set_id remain mutually exclusive when both are supplied.

name
string
description
string | null
repository_id
string<uuid> | null
repository_set_id
string<uuid> | null
system_prompt
string | null
mobile_testing_enabled
boolean

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

personal_preferences
string | null

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

Response

Environment updated

environment
object
required

An environment — the config bundle workspaces are created from. Holds an optional repository binding plus the runtime variables, files, skills, MCPs, and warm hook applied to every workspace built from it. Every organization has a singleton Global environment (is_global: true) whose values are layered onto every other environment. Personal environments have user_id set and are visible only to their owner. Source-backed personal environments expose source-derived repository binding and system prompt values while keeping the source link in source_environment_id.