---
title: "Destroy Environment"
method: POST
path: "/environments/{id}/destroy"
tags: ["Environments"]
---

# Destroy Environment

`POST /environments/{id}/destroy`

## Path parameters

- `id` string, required

## Query parameters

- `checkoutUpdatedCode` 'true' | 'false'
- `isScheduledRun` 'true' | 'false'
- `skipStateRefresh` 'true' | 'false'
- `revision` string
- `requiresApproval` 'true' | 'false'

## Request body

- EnvironmentApiDestroyRequestBody
  - `triggerName` union
    - 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow'
    - 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation'
    - 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow'
    - 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation'
    - 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow' | 'user' | 'terraform-cli' | 'workflow'
    - 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation' | 'cd' | 'prPlan' | 'driftDetection' | 'ttl' | 'scheduled' | 'comment' | 'import' | 'driftRemediation'
  - `workflowDeploymentId` string
  - `comment` string
  - `subEnvironmentAlias` string

## Response `200`

- EnvironmentApiDestroyResponse
  - `id` string, required

---

[API](https://skmtc.dev/envzero/apis/env0-api.md) · [All operations](https://skmtc.dev/envzero/apis/env0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/envzero/env0-api/revisions/513441cbe9dc/schema)
