# Delete Domain

**DELETE** `/v1/payment-methods/{payment_method}/domains/{domain_id}`

Base URL: `https://api-sandbox.whitelabel.com`

Unregisters a domain from the wallet provider and marks the registration as `INACTIVE`, freeing its slot on the connection. Use it to remove domains you no longer use before registering new ones. The domain must be in `CREATED`, `REGISTERED` or `ERROR` status. A deleted domain cannot be restored: register it again if you need it back.

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Path parameters

- `payment_method` (string, required)
  Payment method the domain was registered for.
- `domain_id` (string, required)
  The `id` of the domain registration (UUID), as returned by Register domain.

## Body

Content type: `application/json`

- `reason` (string)
  Optional free-text reason kept for audit purposes. Defaults to `Removed via API`.

Example:

```json
{
  "reason": "string"
}
```

## Responses

### 204

No Content: the domain was unregistered (body is empty).

### 400

Invalid parameters, or the domain is already `INACTIVE`.

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "RESOURCE_NOT_FOUND",
  "messages": [
    "string"
  ]
}
```

### 404

No domain with that `id` exists for your organization.

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "RESOURCE_NOT_FOUND",
  "messages": [
    "string"
  ]
}
```