Update Environment
POST/v1/environments/{environment_id}
Update an existing environment's configuration.
Path parameters
Headers
Body
Returns
Errors
Any method can also return the general HTTP errors.
Each code below is the value of error.details.error_code in the response body.
Update Environment
curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2026-10-21' \
-H 'anthropic-beta: managed-agents-2026-04-01' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
-d '{
"description": "Python environment with data-analysis packages."
}'Response 200
{
"id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"archived_at": null,
"config": {
"networking": {
"allow_mcp_servers": false,
"allow_package_managers": true,
"allowed_hosts": [
"api.example.com"
],
"type": "limited"
},
"packages": {
"apt": [],
"cargo": [],
"gem": [],
"go": [],
"npm": [],
"pip": [
"pandas",
"numpy"
],
"type": "packages"
},
"type": "cloud"
},
"created_at": "2026-03-15T10:00:00Z",
"description": "Python environment with data-analysis packages.",
"metadata": {},
"name": "python-data-analysis",
"type": "environment",
"updated_at": "2026-03-15T10:00:00Z",
"scope": "organization"
}Returns Examples
Response 200
{
"id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"archived_at": null,
"config": {
"networking": {
"allow_mcp_servers": false,
"allow_package_managers": true,
"allowed_hosts": [
"api.example.com"
],
"type": "limited"
},
"packages": {
"apt": [],
"cargo": [],
"gem": [],
"go": [],
"npm": [],
"pip": [
"pandas",
"numpy"
],
"type": "packages"
},
"type": "cloud"
},
"created_at": "2026-03-15T10:00:00Z",
"description": "Python environment with data-analysis packages.",
"metadata": {},
"name": "python-data-analysis",
"type": "environment",
"updated_at": "2026-03-15T10:00:00Z",
"scope": "organization"
}