Claude Platform Docs

Environments

Create Environment
POST/v1/environments
List Environments
GET/v1/environments
Get Environment
GET/v1/environments/{environment_id}
Update Environment
POST/v1/environments/{environment_id}
Delete Environment
DELETE/v1/environments/{environment_id}
Archive Environment
POST/v1/environments/{environment_id}/archive
Models
BetaCloudConfig object{ networking, packages, type }

cloud environment configuration.

BetaCloudConfigParams object{ type, networking, packages }

Request params for cloud environment configuration.

Fields default to null; on update, omitted fields preserve the existing value.

BetaEnvironment object{ id, archived_at, config, 7 more }

Unified Environment resource for both cloud and self-hosted environments.

BetaEnvironmentDeleteResponse object{ id, type }

Response after deleting an environment.

id: string

Environment identifier

type: "environment_deleted"

The type of response

defaultenvironment_deleted
BetaLimitedNetwork object{ allow_mcp_servers, allow_package_managers, allowed_hosts, type }

Limited network access.

allow_mcp_servers: boolean

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array.

allow_package_managers: boolean

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array.

allowed_hosts: array of string

Specifies domains the container can reach.

type: "limited"

Network policy type

BetaLimitedNetworkParams object{ type, allow_mcp_servers, allow_package_managers, allowed_hosts }

Limited network request params.

Fields default to null; on update, omitted fields preserve the existing value.

type: "limited"

Network policy type

allow_mcp_servers: optional boolean or null

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array. Defaults to false.

allow_package_managers: optional boolean or null

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array. Defaults to false.

allowed_hosts: optional array of string or null

Specifies domains the container can reach.

BetaPackages object{ apt, cargo, gem, 4 more }

Packages (and their versions) available in this environment.

apt: array of string

Ubuntu/Debian packages to install

cargo: array of string

Rust packages to install

gem: array of string

Ruby packages to install

go: array of string

Go packages to install

npm: array of string

Node.js packages to install

pip: array of string

Python packages to install

type: optional "packages"

Package configuration type

defaultpackages
BetaPackagesParams object{ apt, cargo, gem, 4 more }

Specify packages (and optionally their versions) available in this environment.

When versioning, use the version semantics relevant for the package manager, e.g. for pip use package==1.0.0. You are responsible for validating the package and version exist. Unversioned installs the latest.

apt: optional array of string or null

Ubuntu/Debian packages to install

cargo: optional array of string or null

Rust packages to install

gem: optional array of string or null

Ruby packages to install

go: optional array of string or null

Go packages to install

npm: optional array of string or null

Node.js packages to install

pip: optional array of string or null

Python packages to install

type: optional "packages"

Package configuration type

defaultpackages
BetaSelfHostedConfig object{ type }

Configuration for self-hosted environments.

type: "self_hosted"

Environment type

BetaSelfHostedConfigParams object{ type }

Request params for self_hosted environment configuration.

type: "self_hosted"

Environment type

BetaUnrestrictedNetwork object{ type }

Unrestricted network access.

type: "unrestricted"

Network policy type

EnvironmentsWork

Get Work Item
GET/v1/environments/{environment_id}/work/{work_id}
Poll for Work
GET/v1/environments/{environment_id}/work/poll
Acknowledge Work
POST/v1/environments/{environment_id}/work/{work_id}/ack
Record Heartbeat
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat
Stop Work
POST/v1/environments/{environment_id}/work/{work_id}/stop
List Work Items
GET/v1/environments/{environment_id}/work
Update Work Item
POST/v1/environments/{environment_id}/work/{work_id}
Get Queue Statistics
GET/v1/environments/{environment_id}/work/stats