> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete environment variable

> 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.



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/convai/environment-variables/{env_var_id}
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/environment-variables/{env_var_id}:
    delete:
      tags:
        - Agents Platform
      summary: Delete environment variable
      description: >-
        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.
      operationId: delete_environment_variable
      parameters:
        - name: env_var_id
          in: path
          required: true
          schema:
            type: string
            title: Env Var Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '204':
          description: Environment variable deleted
        '404':
          description: Environment variable not found
        '409':
          description: Environment variable is still in use
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.