# Show DNS zone of a domain

> The DNS zone of one domain at manitu, as BIND zone file text (raw or compiled).

- Effect: Read - Changes nothing.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_domain_dns_zone_get` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/domain/dns/zone/get`
- Needs: `service_domain`
- Page: /reference/domain/dns/zone/get/

## MCP tool

`manitu_domain_dns_zone_get`

### Description for the model

Returns the DNS zone of a domain at manitu, by its name, as BIND zone file text - all records (A, AAAA, MX, TXT, CNAME, ...) in one piece, for answering what DNS says about a name or mail, or for checking a record. Only for a zone manitu holds as primary (dns.zone "primary" in manitu_domain_get); otherwise refused with a conflict (zone_not_primary_at_manitu) - the DNS records are kept elsewhere then. format raw (default) is the zone file as kept, with relative names ("www" means www.<domain>, "@" the domain itself); compiled is what the name server serves, every name absolute. Read-only - nothing is changed. To change the zone, read it with format raw and pass zone_data and zone_revision to manitu_domain_dns_zone_set.

### Arguments

- `name` (string, required) - The domain name, with international characters or in ASCII. (minLength `1`; maxLength `253`)
- `format` (string) - raw (default): the zone file as it is kept - relative names, $TTL, comments. compiled: as the name server serves it - every name absolute, every TTL written out. (one of `"raw"`, `"compiled"`)

### Example

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

## REST

`POST https://api.manitu.de/v1/domain/dns/zone/get`

### Authentication

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

### Request body

JSON; unknown fields are refused.

- `name` (string, required) - The domain name, with international characters or in ASCII. (minLength `1`; maxLength `253`)
- `format` (string) - raw (default): the zone file as it is kept - relative names, $TTL, comments. compiled: as the name server serves it - every name absolute, every TTL written out. (one of `"raw"`, `"compiled"`)

### Response

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

- `name` (string, required) - The domain, with international characters.
- `format` (string, required) - (one of `"raw"`, `"compiled"`)
- `zone_data` (string, required) - The zone, as BIND zone file text.
- `zone_revision` (string | null, required) - The version of the zone read (raw only, else null) - manitu_domain_dns_zone_set asks it back.

### 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/domain/dns/zone/get' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"example.com"}'
```

## Example result

```json
{
  "name": "example.com",
  "format": "raw",
  "zone_data": "string",
  "zone_revision": "string"
}
```
