# POST /api/v1/domains/{domain}/actions/restore

> Hold a domain restore for confirmation

- Group: domains
- Tier: W
- Required scope: write:billing + write:domains
- Docs: https://api.inleed.com/reference/domains/restore-domain

## Description

Validates ownership, then returns `{status:"confirmation_required", confirmationUrl, …}`. It restores nothing and charges nothing on this call — show the human the URL; they approve it in the client area. On approval a best-effort redemption quote is returned.

## Path parameters

- `domain` — string (required)

## Body

- `years` — integer. How many years to add on restore (1–10), where the registry bills the restore as a renewal. Omit for the registry default.
- `attempt_key` — string. Idempotency key for this intent. Keep it stable across retries so a timed-out retry cannot buy the same thing twice. Up to 128 characters.
- `input` — string (required). A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.

## Request

```bash
curl -X POST "https://mcp.inleed.com/api/v1/domains/example.se/actions/restore" \
  -H "Authorization: Bearer inl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"years":1,"attempt_key":"example.se","input":"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
- GET /api/v1/domains/{domain}/actions/register — https://api.inleed.com/reference/domains/get-register-quote
- GET /api/v1/domains/{domain}/actions/renew — https://api.inleed.com/reference/domains/get-renew-quote

