---
title: "Delete Environment"
method: DELETE
path: "/v1/environments/{environmentId}"
tags: ["Environments"]
---

# Delete Environment

`DELETE /v1/environments/{environmentId}`

This endpoint removes an Environment identified by the `environmentId` parameter.
If the `cleanupAuditLogs` flag is set to true, it also deletes the audit log records related to the environment
(except for the `Created a new environment` and `Deleted an environment` records).

## Path parameters

- `environmentId` string, uuid, required

## Query parameters

- `cleanupAuditLogs` boolean

## Response `204`

When the delete was successful.

## Other responses

- `400` — Bad request.
- `404` — Not found.
- `429` — Too many requests. In case of the request rate exceeds the rate limits.

---

[API](https://skmtc.net/configcat/apis/configcat-public-management-api.md) · [All operations](https://skmtc.net/configcat/apis/configcat-public-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/configcat/configcat-public-management-api/versions/6b4d53bc1455/schema)
