# Delete subdomain of a web hosting package

> Delete one subdomain of a web hosting package that nothing uses.

- Effect: Destructive - Removes something for good. Agents ask first.
- Idempotent: no
- Stability: beta
- MCP tool: `manitu_webhosting_subdomain_delete` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/webhosting/subdomain/delete`
- Needs: `service_webhosting`
- Page: /reference/webhosting/subdomain/delete/

**Removes something for good. Agents name what will be lost and wait for an explicit yes; a program should ask the same.**

## MCP tool

`manitu_webhosting_subdomain_delete`

### Description for the model

Deletes a subdomain of a web hosting package of the manitu customer account this connection works in, by site_id and fqdn from manitu_webhosting_subdomain_list. Only one nothing uses: a website (vHost) or mail addresses at it give a conflict (in_use, saying what) - remove those first, with the customer. Its records go from the DNS zone of the domain only where the zone is at manitu; elsewhere (dns_zone: not_at_manitu) the customer removes them himself at his DNS provider - do not say they are gone before the answer says dns_zone: updated. Files and mail are not touched. Refused with a conflict when the package cannot be changed now (not_configurable). Ask the customer for an explicit yes first.

### Arguments

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `fqdn` (string, required) - The subdomain from manitu_webhosting_subdomain_list, e.g. cloud.example.de. Never guess one. (minLength `3`; maxLength `253`)
- `dns_zone_update` (boolean) - Merge manitu's records for the subdomain into the DNS zone of the domain (default true). false only if the customer keeps the zone by hand - then he must set the records himself.

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_webhosting_subdomain_delete",
    "arguments": {
      "site_id": 12345,
      "fqdn": "example.com"
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/webhosting/subdomain/delete`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `fqdn` (string, required) - The subdomain from manitu_webhosting_subdomain_list, e.g. cloud.example.de. Never guess one. (minLength `3`; maxLength `253`)
- `dns_zone_update` (boolean) - Merge manitu's records for the subdomain into the DNS zone of the domain (default true). false only if the customer keeps the zone by hand - then he must set the records himself.

### Response

In `data`; the rest of the body as on every call.

- `fqdn` (string, required) - The subdomain deleted.
- `dns_zone` (string, required) - What became of the DNS zone of the domain: updated - manitu's records for the subdomain were merged in (the customer's own MX, A and AAAA kept where possible; changes made by hand should be checked); skipped - not asked for or nothing to change; not_at_manitu - the zone is elsewhere, the customer must set the records there, else the subdomain does not work; failed - the subdomain is saved, the zone not - the customer should check it. (one of `"updated"`, `"skipped"`, `"not_at_manitu"`, `"failed"`)

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/webhosting/subdomain/delete' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345,"fqdn":"example.com"}'
```

## Example result

```json
{
  "fqdn": "example.com",
  "dns_zone": "updated"
}
```
