curl -X DELETE "https://agent.api.lyzr.app/v2/environment/{env_id}" \
-H "accept: application/json"\
-H "Content-Type: application/json" \
-H "x-api-key: your_Lyzr_API_Key_Here"
{
    "message": "Environment deleted successfully."
}

Endpoint: DELETE /v2/environment/{env_id}

This endpoint allows you to delete an existing environment using its unique environment ID. This operation removes the environment and its associated configurations from the system.

Parameters

env_id
string
required

The unique identifier of the environment to be deleted.

Curl
curl -X DELETE "https://agent.api.lyzr.app/v2/environment/{env_id}" \
-H "accept: application/json"\
-H "Content-Type: application/json" \
-H "x-api-key: your_Lyzr_API_Key_Here"
Python
import requests

env_id = "66e1820aa64xxxxxx"
url = f"https://agent.api.lyzr.app/v2/environment/{env_id}"

headers = {
    "Content-Type": "application/json",
    "x-api-key": "your_Lyzr_API_Key_Here"
}

response = requests.delete(url, headers=headers)
{
    "message": "Environment deleted successfully."
}

Response Parameters

message
string

Confirmation of successful environment deletion