---
title: "Delete environment"
method: DELETE
path: "/v1/projects/{project_id}/environments/{environment_id}"
tags: ["environments"]
---

# Delete environment

`DELETE /v1/projects/{project_id}/environments/{environment_id}`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/environments/{environment_id}`
- Auth: HTTP bearer

Delete an environment.

Its deployments are deactivated, its connectors disabled and its OAuth apps removed, and its
scheduled, queued, running and approval-waiting runs are cancelled. The default environment and the
last standard environment cannot be deleted (400); a test environment with an active test session returns 409.

Required permission: `environments.delete`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required

## Response `200`

Successful Response

- PublicOkResponse
  - `ok` boolean, required: Whether the operation succeeded.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
