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

# Delete Environment Variable

`DELETE /v1/convai/environment-variables/{env_var_id}`

## 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/environment-variables/{env_var_id}`
- Auth: none declared

Delete an environment variable and its values in all environments. WARNING: Agents are not checked. A variable that an agent still uses (custom LLM, webhooks or cloud storage export, on any branch or version) is deleted anyway, and that agent's conversations then fail. The delete is only rejected while tools, MCP servers or the workspace conversation initiation webhook use the variable.

## Path parameters

- `env_var_id` string, required

## 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 variable deleted

## Other responses

- `404`: Environment variable not found
- `409`: Environment variable is still in use
- `422`: Validation Error

## Changes

- **2026-10-26** `7e6397600c64`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/convai/environment-variables/:env_var_id/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/d04f5e77c40a?raw)
