Skip to content
中文

Archive Environment

Call Create environment first and replace env_123 with its returned ID.

POST/agent/v1/environments/{environment_id}/archive◐ Partial

Request parameters

  • environment_idstringrequired

    path: Environment id, as returned by environments.create or environments.list. Built-in environments can be read but not changed.

Returns

200

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 Anthropic error format (type / message / request_id) — see error codes

Request

curl
# Call Create environment first and replace env_123 with its returned ID.
curl -X POST https://api.deepraxis.com/agent/v1/environments/env_123/archive \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# Call Create environment first and replace env_123 with its returned ID.
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
    f"{opts['base_url']}/v1/environments/env_123/archive",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
// Call Create environment first and replace env_123 with its returned ID.
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/environments/env_123/archive`, {
  method: "POST",
  headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());

Response 200

{
  "id": "env_8010a04c445b4176964e978afa1c46d0",
  "name": "docs-k16-updated",
  "description": null,
  "created_at": "2026-10-11T10:34:48.706Z",
  "updated_at": "2026-10-11T10:34:50.853Z",
  "archived_at": "2026-10-11T10:34:50.853Z",
  "type": "environment",
  "config": {
    "type": "cloud",
    "networking": {
      "type": "unrestricted"
    },
    "packages": {
      "type": "packages",
      "apt": [],
      "pip": [],
      "npm": [],
      "cargo": [],
      "gem": [],
      "go": []
    }
  },
  "metadata": {}
}

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
config.template string | null Sandbox template machines of this environment are created from: a public Base name or one of your own sandbox Environments (name or sbe_ id); size is expressed by the template name. The built-in node22 shows node22; null or absent means the default node22. /agent/v1 only.
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.