Archive Environment

Changed on

Archive an environment by ID. Archived environments cannot be used to create new sessions.

post/v1/environments/{environment_id}/archive?beta=true

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Path parameters

environment_idstring required

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

anthropic-workspace-idstring

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Response

Successful Response

archived_atstring nullable required

RFC 3339 timestamp when environment was archived, or null if not archived

created_atstring required

RFC 3339 timestamp when environment was created

descriptionstring nullable required

User-provided description for the environment; null when unset

idstring required

Environment identifier (e.g., 'env_...')

metadataobject required

User-provided metadata key-value pairs

namestring required

Human-readable name for the environment

scope'organization' | 'account'

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

type'environment' required

The type of object (always 'environment')

updated_atstring required

RFC 3339 timestamp when environment was last updated

Example response

{
  "type": "environment",
  "id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
  "name": "python-data-analysis",
  "description": "Python environment with data-analysis packages.",
  "config": {
    "type": "cloud",
    "networking": {
      "type": "limited",
      "allowed_hosts": [
        "api.example.com"
      ],
      "allow_package_managers": true,
      "allow_mcp_servers": false
    },
    "packages": {
      "type": "packages",
      "pip": [
        "pandas",
        "numpy"
      ],
      "npm": [],
      "apt": [],
      "cargo": [],
      "gem": [],
      "go": []
    }
  },
  "metadata": {},
  "archived_at": null,
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}

Changes

    • info

      added the enum value admin-user-sign-out-2026-10-08 to the property items/anyOf[subschema #2]/ of the header request parameter anthropic-beta

    • info

      added the enum value experimental-claude-tag-2026-10-21 to the property items/anyOf[subschema #2]/ of the header request parameter anthropic-beta