v1

latestOpenAPI 3.1.02026-07-22100167210.7 KB
Environments

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.

post/v1/environments

Request body

namestring required

Human-readable name (must be unique within the selected scope)

descriptionstring nullable

Optional description

scope'org' | 'user'

org creates a team environment. user creates a personal environment visible only to the authenticated user.

source_environment_idstring uuid nullable

Optional source. Team environments copy from the source on create. Personal environments inherit from a team source and keep inherited config locked.

repository_idstring uuid nullable

Bind to this repository. Mutually exclusive with repository_set_id.

repository_set_idstring uuid nullable

Bind to this repository set. Mutually exclusive with repository_id.

system_promptstring nullable

Optional system prompt prepended to the coding agent.

mobile_testing_enabledboolean

Enable mobile testing. Only valid for team environments on Team and Enterprise plans; otherwise returns PLAN_UPGRADE_REQUIRED.

Response

Environment created