Create Environment
Creates a new team or personal environment. repository_id and repository_set_id are mutually exclusive; both may be omitted for an unbound environment that can back repo-less workspaces. Personal environments are visible only to the authenticated user. When scope=user and source_environment_id references a team environment, the personal environment inherits from that source instead of copying it.
Authorizations
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.
Body
Request body for creating a new environment.
Human-readable name (must be unique within the selected scope)
Optional description
org creates a team environment. user creates a personal environment visible only to the authenticated user.
org, user Optional source. Team environments copy from the source on create. Personal environments inherit from a team source and keep inherited config locked.
Bind to this repository. Mutually exclusive with repository_set_id.
Bind to this repository set. Mutually exclusive with repository_id.
Optional system prompt prepended to the coding agent.
Enable mobile testing. Only valid for team environments on trial, Team, and Enterprise plans; otherwise returns PLAN_UPGRADE_REQUIRED.
Response
Environment created
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.