---
title: "Delete Environment"
method: DELETE
path: "/v1/convai/environments/{environment}"
tags: ["Agents Platform"]
---

# Delete Environment

`DELETE /v1/convai/environments/{environment}`

## Request

- Base URL: `https://api.elevenlabs.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elevenlabs.io/v1/convai/environments/{environment}`
- Auth: none declared

Delete a workspace environment and remove its values from all environment variables. 'production' cannot be deleted.

## Path parameters

- `environment` string, required: Name of the environment to delete, e.g. 'staging'.

## Headers

- `xi-api-key` string, nullable: Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Response `204`

Environment deleted

## Other responses

- `400`: 'production' cannot be deleted
- `404`: Environment not found
- `422`: Validation Error

## Changes

- **2026-10-16** `4b43b1758c9b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/convai/environments/:environment/delete.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/0e2bfc751634?raw)
