List Environments

List environments with pagination support.

get/v1/environments?beta=true

Query parameters

limitinteger

Maximum number of environments to return

Maximum number of environments to return

pagestring nullable

Opaque cursor from previous response for pagination. Pass the next_page value from the previous response.

Opaque cursor from previous response for pagination. Pass the next_page value from the previous response.

include_archivedboolean

Include archived environments in the response

Include archived environments in the response

Headers

anthropic-betastring

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

x-api-keystring nullable

Response

Successful Response

next_pagestring nullable required

Token for fetching the next page of results. If null, there are no more results available. Pass this value to the page parameter in the next request.

Example response

{
  "data": [
    {
      "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"
    }
  ],
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}

Changes

Changed in 4 of the 67 revisions of this API.213

    • response property data/items/description list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 40e330aba8bc12See the full diff
    • added BetaSelfHostedConfig to the data/items/config response property oneOf list for the response status 200

      response-property-one-of-added

    • added the optional property data/items/scope to the response with the 200 status

      response-optional-property-added

    • added self_hosted discriminator mapping keys to the data/items/config response property for the response status 200

      response-property-discriminator-mapping-added

    • deleted the cookie request parameter sessionKey

      request-parameter-removed

    • endpoint added

      endpoint-added