Delete Environment
/anthropic/v1/environments/{environment_id}◐ PartialRequest parameters
environment_idstringrequiredpath: Environment ID (path or query parameter).
Returns
501
Deletion is archive-based soft deletion: the environment gets a deletion tombstone, GET returns 404, and both default lists and include_archived=true lists stop showing it; ordinary archival is unaffected — an archived, not deleted, environment stays readable and still appears under include_archived=true. Existing sessions are unaffected and keep the configuration pinned when they were created; unarchived agent references do not prevent deletion. Built-in environments cannot be deleted and return 409. The response matches the official shape: 200 with {id, type:"environment_deleted"}. The official semantics are a hard delete once no sessions reference the environment; the platform soft-deletes with a tombstone instead and does not permanently erase data.
Errors follow the Claude Managed Agents format — see error codes
Request
curl
curl -X DELETE https://api.deepraxis.com/anthropic/v1/environments/environment_123 \
-H "x-api-key: $PRAXIS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01"Python
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.deepraxis.com/anthropic",
api_key="$PRAXIS_API_KEY",
)
# 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
result = client.beta.delete("environment_123")
print(result)TypeScript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.deepraxis.com/anthropic",
apiKey: "$PRAXIS_API_KEY",
});
// 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
const result = await client.beta.delete("environment_123");
console.log(result);Response 501
{
"type": "error",
"error": {
"type": "not_implemented_error",
"message": "Not implemented: environments cannot be deleted (DELETE /v1/environments/{environment_id}); archive the environment instead with POST /v1/environments/{environment_id}/archive."
},
"request_id": "67ea4f2b-e060-4bb8-b382-e85357aa29c7"
}Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier |
| type | string | The type of response |