---
title: "Delete a domain"
method: DELETE
path: "/organizations/{orgId}/environments/{envId}/domains/{domainKey}"
tags: ["Domains"]
---

# Delete a domain

`DELETE /organizations/{orgId}/environments/{envId}/domains/{domainKey}`

## Request

- Base URL: `http://localhost:8093/automation`
- URL: `http://localhost:8093/automation/organizations/{orgId}/environments/{envId}/domains/{domainKey}`
- Auth: HTTP bearer

Deletes an Automation-managed domain. Deletion cascades to the domain's sub-resources (certificates, identity providers, and reporters). Deleting a domain that does not exist also returns 204.

## Path parameters

- `orgId` string, required
- `envId` string, required
- `domainKey` string, required

## Response `204`

Domain successfully deleted

## Other responses

- `403`: Permission denied
- `default`: Unexpected error

---

[API](https://skmtc.dev/gravitee-io/apis/gravitee-io-am-automation-api.md) - [All operations](https://skmtc.dev/gravitee-io/apis/gravitee-io-am-automation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gravitee-io/apis/gravitee-io-am-automation-api/revisions/b0b6bdfd65cb?raw)
