---
title: "Delete a domain"
method: DELETE
path: "/v1/domains/{domain_id}"
tags: ["domains"]
---

# Delete a domain

`DELETE /v1/domains/{domain_id}`

## Request

- Base URL: `https://api.ethiack.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ethiack.com/v1/domains/{domain_id}`
- Auth: none declared

Delete a domain, and by default the assets no other proof covers.

The optional body's ``delete_assets`` controls the cascade; omitting
the body (as every legacy client does) keeps legacy's behaviour and
removes the assets under the domain that no other active proof still
covers.

Args:
    domain_id (int): The domain's identifier.
    db (AsyncSession): Request-scoped database session.
    context (ActiveContext): Resolved caller identity and scope.
    body (DeleteDomainRequest | None): Optional cascade switch.

Returns:
    SuccessResponse: The legacy delete envelope, echoing the removed id.

Raises:
    NotFoundError: No domain with that id is visible to the caller.
    PermissionError: Cerbos denied the composite delete.

## Path parameters

- `domain_id` integer, required

## Request body

- DeleteDomainRequest: Optional body for ``DELETE /v1/domains/{domain_id}``. Legacy's delete took no body and always removed the assets under the domain; omitting the body keeps that behaviour. Attributes: delete_assets (bool): Also remove the organization's assets under the domain that no other active proof still covers. Defaults to ``True`` (legacy behaviour); send ``false`` to keep the assets and remove only the domain.
  - `delete_assets` boolean: Also remove the assets under this domain that no other active proof covers. Defaults to true, the legacy behaviour.

## Response `200`

Successful Response

- SuccessResponse: Standard response for successful write operations. Matches the ``SuccessResponse`` contract from api-3. Attributes: code (int): HTTP status code. description (str): Human-readable result description. id (int | str | None): Created/affected resource ID. success (bool): Always ``True`` for successful responses.
  - `code` integer, required
  - `description` string, required
  - `id` union
    - integer
    - string
  - `success` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ethiack/apis/ethiack-api.md) - [All operations](https://skmtc.dev/ethiack/apis/ethiack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ethiack/apis/ethiack-api/revisions/4eaba89bfebf?raw)
