AnthropicClaude Managed Agents

Update Environment

Update an execution environment's configuration.

POST /anthropic/v1/environments/{environment_id}◐ Partial

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • namestring可选

    Updated name for the environment

  • configobject可选

    Updated environment configuration

    ▸ 展开子字段(3)
    • typestring必填

      Environment type

      取值 self_hosted
    • networkingobject可选

      Network configuration policy. Omit on update to preserve the existing value.

    • packagesobject可选

      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. Under `limited` networking, requires `networking.allow_package_managers` to be `true`.

  • descriptionstring可选

    Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string.

  • metadataobject可选

    User-provided metadata key-value pairs. Set a value to null or empty string to delete the key.

  • scopestring可选

    The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only.

Returns

501

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier (e.g., 'env_...')
archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
config.networkingobjectNetwork configuration policy.
config.packagesobjectPackage manager configuration.
config.typestringEnvironment type
created_atstringRFC 3339 timestamp when environment was created
descriptionnull | stringUser-provided description for the environment; null when unset
metadataobjectUser-provided metadata key-value pairs
namestringHuman-readable name for the environment
typestringThe type of object (always 'environment')
updated_atstringRFC 3339 timestamp when environment was last updated
scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.