# Set name servers of a domain

> Delegate a domain to manitu's name servers or to 2 to 4 of the customer's own.

- Effect: Write - Changes the account. Agents ask first.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_domain_dns_nameserver_set` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/domain/dns/nameserver/set`
- Needs: `service_domain`
- Page: /reference/domain/dns/nameserver/set/

**Changes the account. Agents say what will happen and wait for an explicit yes before calling it.**

## MCP tool

`manitu_domain_dns_nameserver_set`

### Description for the model

Sets the name servers of a domain at manitu: type custom with 2 to 4 of the customer's own (nameserver_list), or type manitu to go back to manitu's. With custom name servers the DNS zone at manitu is no longer used - the customer's servers must already serve the domain (checked: each answers on port 53, and the delegation is right; refusals name the name server by index: hostname_invalid, manitu_nameserver, unreachable, duplicate, delegation_invalid). Tell the customer what changes and wait for an explicit yes - web site and e-mail depend on it, and it takes hours to reach every resolver. handled in the answer: automatic (set now) or manual (manitu's support does it - tell the customer it may take a while). Refused with a conflict when manitu's are set already (nameserver_already_manitu).

### Arguments

- `name` (string, required) - The domain name, with international characters or in ASCII. (minLength `1`; maxLength `253`)
- `type` (string, required) - manitu: back to manitu's name servers. custom: the customer's own, in nameserver_list. (one of `"manitu"`, `"custom"`)
- `nameserver_list` (array of string) - For custom only: the host names of the name servers, e.g. ns1.example.com. (minItems `2`; maxItems `4`)

### Example

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

## REST

`POST https://api.manitu.de/v1/domain/dns/nameserver/set`

### 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`)
- `type` (string, required) - manitu: back to manitu's name servers. custom: the customer's own, in nameserver_list. (one of `"manitu"`, `"custom"`)
- `nameserver_list` (array of string) - For custom only: the host names of the name servers, e.g. ns1.example.com. (minItems `2`; maxItems `4`)

### Response

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

- `name` (string, required) - The domain, with international characters.
- `type` (string, required) - (one of `"manitu"`, `"custom"`)
- `nameserver_list` (array of string, required) - The name servers asked for.
- `handled` (string, required) - automatic: set at the registry now. manual: manitu's support was asked to set it. (one of `"automatic"`, `"manual"`)

### 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/nameserver/set' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"example.com","type":"manitu"}'
```

## Example result

```json
{
  "name": "example.com",
  "type": "manitu",
  "nameserver_list": [
    "string"
  ],
  "handled": "automatic"
}
```
