Update Environment
/anthropic/v1/environments/{environment_id}◐ PartialRequest parameters
environment_idstringrequiredpath: Environment ID (path or query parameter).
namestringoptionalUpdated name for the environment
configobjectoptionalUpdated environment configuration
Expand sub-fields (3)
typestringrequiredEnvironment kind: cloud runs sessions in a sandbox recipe; self_hosted is not supported and returns 400.
networkingobjectoptionalNetwork configuration policy. Omit on update to preserve the existing value. Not used when type is self_hosted.
packagesobjectoptionalSpecify packages (and optionally their versions) available in this environment.
When versioning, use the version semantics relevant for the package manager, e.g. for
pipusepackage==1.0.0. You are responsible for validating the package and version exist. Unversioned installs the latest.Under
limitednetworking, requiresnetworking.allow_package_managersto betrue. Not used when type is self_hosted.
descriptionstringoptionalUpdated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string.
metadataobjectoptionalUser-provided metadata key-value pairs. Set a value to null or empty string to delete the key.
scopestringoptionalThe 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
Request
curl
curl -X POST https://api.deepraxis.com/anthropic/v1/environments/environment_123 \
-H "x-api-key: $PRAXIS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01"Python
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.deepraxis.com/anthropic",
api_key="$PRAXIS_API_KEY",
)
# 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
result = client.beta.update("environment_123", {})
print(result)TypeScript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.deepraxis.com/anthropic",
apiKey: "$PRAXIS_API_KEY",
});
// 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
const result = await client.beta.update("environment_123", {});
console.log(result);Response 501
{
"type": "error",
"error": {
"type": "not_implemented_error",
"message": "Not implemented: this Managed Agents operation is not implemented on this platform yet (POST /v1/environments/{environment_id}); see the docs for the supported subset."
},
"request_id": "c28d8a36-8b46-4286-9fa3-8051e4440335"
}Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier (e.g., 'env_...') |
| archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| config.networking | object | Network configuration policy. |
| config.packages | object | Package manager configuration. |
| config.type | string | Environment type |
| created_at | string | RFC 3339 timestamp when environment was created |
| description | null | string | User-provided description for the environment; null when unset |
| metadata | object | User-provided metadata key-value pairs |
| name | string | Human-readable name for the environment |
| type | string | The type of object (always 'environment') |
| updated_at | string | RFC 3339 timestamp when environment was last updated |
| scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |