# POST /api/v1/domains/{domain}/nameservers

> Hold a nameserver change for confirmation

- Group: domains
- Tier: W
- Required scope: write:domains
- Docs: https://api.inleed.com/reference/domains/set-nameservers

## Description

Validates ownership and every host, reads the current nameservers, then returns `{status:"confirmation_required", confirmationUrl, …}`. It changes nothing on this call — show the human the URL; they approve it in the client area. Poll `get_pending_action`.

## Path parameters

- `domain` — string (required)

## Body

- `input` — string. A domain, email address, website URL, or Inleed service id — for example example.se, info@example.se or 42976. Resolved to the owning account automatically, and the resolved target is echoed back in the response.
- `inputs` — string[]. Several domains to repoint in one confirmation (2–25 identifiers, each as for input): the customer sees one card listing every domain with its current and new nameservers, and approves once. Use this — not repeated calls — when the customer wants several domains on the same nameservers.
- `nameservers` — string[]. The full set of nameserver hostnames to set (2–13), e.g. ns1.inleed.net.
- `attempt_key` — string. Idempotency key for this intent. Keep it stable across retries so a timed-out retry cannot buy the same thing twice.

## Request

```bash
curl -X POST "https://mcp.inleed.com/api/v1/domains/example.se/nameservers" \
  -H "Authorization: Bearer inl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"input":"example.se","inputs":["example.se"],"nameservers":["example.se"],"attempt_key":"example.se"}'
```

## Response · 200

```json
{
  "status": "active",
  "pendingActionId": "example.se",
  "confirmationUrl": "https://mcp.inleed.com/…",
  "expiresAt": "2026-08-30T09:12:44.000Z",
  "preview": []
}
```

## Errors

- **400**  — codes: invalid_request
- **401** No token was presented, or the token is revoked, expired or unknown. — codes: unauthorized, token_expired, token_revoked
- **403** The token lacks a required scope, or this account does not own the resource. — codes: insufficient_scope, not_owned
- **404** No such resource for this account. — codes: not_found
- **422** Validation error — codes: validation_failed
- **429** The rate limit for this token is exhausted. See `Retry-After`. — codes: rate_limited
- **500** Something went wrong on our side. The failure is logged against `requestId`. — codes: internal_error

## Related

- GET /api/v1/domains — https://api.inleed.com/reference/domains/list-domains
- GET /api/v1/domains/{domain} — https://api.inleed.com/reference/domains/get-domain
- POST /api/v1/domains/{domain}/nameservers/actions/use-inleed — https://api.inleed.com/reference/domains/use-inleed-nameservers
- GET /api/v1/domains/{domain}/auth-code — https://api.inleed.com/reference/domains/get-domain-auth-code

