Archive Environment
api/beta/environments/archive
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/environments/archive Changed · +18 / -31 lines
# Archive Environment ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Archive Environment ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Archive Environment -url: https://platform.claude.com/docs/en/api/beta/environments/archive ---- +# Archive Environment -## Archive Environment +**POST** `/v1/environments/{environment_id}/archive` -**post** `/v1/environments/{environment_id}/archive` - Archive an environment by ID. Archived environments cannot be used to create new sessions. -### Path Parameters +## Path parameters - `environment_id: string` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns -- `BetaEnvironment object { id, archived_at, config, 7 more }` +- `BetaEnvironment object` Unified Environment resource for both cloud and self-hosted environments.
Environment configuration (either Anthropic Cloud or self-hosted) - - `BetaCloudConfig object { networking, packages, type }` + - `BetaCloudConfig object` `cloud` environment configuration.
Network configuration policy. - - `BetaUnrestrictedNetwork object { type }` + - `BetaUnrestrictedNetwork object` Unrestricted network access.
Network policy type - - `"unrestricted"` + - `BetaLimitedNetwork object` - - `BetaLimitedNetwork object { allow_mcp_servers, allow_package_managers, allowed_hosts, type }` - Limited network access. - `allow_mcp_servers: boolean`
Network policy type - - `"limited"` - - `packages: BetaPackages` Package manager configuration.
Package configuration type - - `"packages"` + default: packages - `type: "cloud"` Environment type - - `"cloud"` + - `BetaSelfHostedConfig object` - - `BetaSelfHostedConfig object { type }` - Configuration for self-hosted environments. - `type: "self_hosted"`
Environment type - - `"self_hosted"` - - `created_at: string` RFC 3339 timestamp when environment was created
The type of object (always 'environment') - - `"environment"` + default: environment - `updated_at: string`
- `"account"` -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/archive \ -X POST \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {