Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

environments changed

managed-agents/environments

Nearest release: v2.1.277, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+21added
Lines−27removed
From line 16 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits11to this page, all time

The whole hunk

from line 16, old and new numbered
/
lines
from line 16
1616 
1717<CodeGroup defaultLanguage="CLI">
1818 ```bash cURL
19 environment=$(curl -fsS https://api.anthropic.com/v1/environments \
19 curl -fsS https://api.anthropic.com/v1/environments \
2020 -H "x-api-key: $ANTHROPIC_API_KEY" \
2121 -H "anthropic-version: 2023-06-01" \
2222 -H "anthropic-beta: managed-agents-2026-04-01" \
from line 30
3030 }
3131 }
3232 EOF
33 )
34 environment_id=$(jq -r '.id' <<< "$environment")
35 
36 echo "Environment ID: $environment_id"
3733 ```
3834 
3935 <MultiFileExample language="cli" label="CLI">
from line 140
144140 
145141Pass the environment ID as a string when [creating a session](https://platform.claude.com/docs/en/managed-agents/sessions).
146142 
147<CodeGroup defaultLanguage="CLI">
143<CodeGroup>
148144 ```bash cURL
149 session=$(curl -fsS https://api.anthropic.com/v1/sessions \
145 curl -fsS https://api.anthropic.com/v1/sessions \
150146 -H "x-api-key: $ANTHROPIC_API_KEY" \
151147 -H "anthropic-version: 2023-06-01" \
152148 -H "anthropic-beta: managed-agents-2026-04-01" \
from line 149
153149 -H "content-type: application/json" \
154150 --data @- <<EOF
155151 {
156 "agent": "$agent_id",
157 "environment_id": "$environment_id"
152 "agent": "$AGENT_ID",
153 "environment_id": "$ENVIRONMENT_ID"
158154 }
159155 EOF
160 )
161156 ```
162157 
163158 ```bash CLI
from line 223
228223 
229224<CodeGroup defaultLanguage="CLI">
230225 ```bash cURL
231 environment=$(curl -fsS https://api.anthropic.com/v1/environments \
226 curl -fsS https://api.anthropic.com/v1/environments \
232227 -H "x-api-key: $ANTHROPIC_API_KEY" \
233228 -H "anthropic-version: 2023-06-01" \
234229 -H "anthropic-beta: managed-agents-2026-04-01" \
from line 241
246241 }
247242 }
248243 EOF
249 )
250244 ```
251245 
252246 <MultiFileExample language="cli" label="CLI">
from line 575
581575 
582576## Manage environments
583577 
584<CodeGroup defaultLanguage="CLI">
578<CodeGroup>
585579 ```bash cURL
586580 # List environments
587 environments=$(curl -fsS https://api.anthropic.com/v1/environments \
581 curl -fsS https://api.anthropic.com/v1/environments \
588582 -H "x-api-key: $ANTHROPIC_API_KEY" \
589583 -H "anthropic-version: 2023-06-01" \
590 -H "anthropic-beta: managed-agents-2026-04-01")
584 -H "anthropic-beta: managed-agents-2026-04-01"
591585 
592586 # Retrieve a specific environment
593 env=$(curl -fsS "https://api.anthropic.com/v1/environments/$environment_id" \
587 curl -fsS "https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID" \
594588 -H "x-api-key: $ANTHROPIC_API_KEY" \
595589 -H "anthropic-version: 2023-06-01" \
596 -H "anthropic-beta: managed-agents-2026-04-01")
590 -H "anthropic-beta: managed-agents-2026-04-01"
597591 
598592 # Archive an environment (read-only, existing sessions continue)
599 curl -fsS -X POST "https://api.anthropic.com/v1/environments/$environment_id/archive" \
593 curl -fsS -X POST "https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/archive" \
600594 -H "x-api-key: $ANTHROPIC_API_KEY" \
601595 -H "anthropic-version: 2023-06-01" \
602596 -H "anthropic-beta: managed-agents-2026-04-01"
603597 
604598 # Delete an environment (only if no sessions reference it)
605 curl -fsS -X DELETE "https://api.anthropic.com/v1/environments/$environment_id" \
599 curl -fsS -X DELETE "https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID" \
606600 -H "x-api-key: $ANTHROPIC_API_KEY" \
607601 -H "anthropic-version: 2023-06-01" \
608602 -H "anthropic-beta: managed-agents-2026-04-01"