Delete Environment

Updated at:

Hard delete: the environment configuration is permanently removed and cannot be recovered. To preserve the configuration, use the archive endpoint instead.

Prerequisites

Endpoint and authentication are configured. See Overview and authentication.

Endpoint

DELETE/environments/{environment_id}

Path parameters

environment_idstringRequired

Environment ID, format env_<ULID>

Response fields

idstring

The deleted environment ID

typestring

Fixed as environment_deleted

request_idstring

Unique identifier for this request

Request example

curl -X DELETE "$AGENTSTUDIO_URL/environments/env_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
client.environments.delete("env_xxx")
client.environments().delete("env_xxx");

Response example

{
  "id": "env_xxx",
  "type": "environment_deleted",
  "request_id": "xxx"
}