## GET /api/v2/domains/{id}/reactivation

**Check if an expired domain can be restored**

Shows whether an expired domain can be restored online, what it costs and whether a reactivation is already open. The price is the registry's restore fee plus a one-year renewal. When `available` is true, create the reactivation invoice with `POST /api/v2/domains/{id}/actions/reactivate`. When a reactivation is already open, pay its invoice at `reactivation.paymentInvoice.paymentUrl`. A domain that can still be renewed without a restore fee returns `reasonCode: renewable_normally`. Renew it with `POST /api/v2/domains/{id}/actions/renew` instead.

### Related Endpoints

- `GET /api/v2/domains/{id}`: Get a domain
- `PATCH /api/v2/domains/{id}`: Update a domain's settings
- `DELETE /api/v2/domains/{id}`: Delete a domain

### Headers

- `Authorization`: Bearer $HOSTUP_API_KEY
- Scope: `read:domains`

### Parameters

- `id` (path, string, required): The domain ID (`dom_…`). Example: `dom_01hxa3b4c5d6e7f8g9h0j1k2m3`

### Request Example

```bash
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/reactivation" \
  -H "Authorization: Bearer $HOSTUP_API_KEY"
```

### Response Schema

- `domainId` (string, required): The domain ID (`dom_…`). Example: `dom_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `domainName` (string, required, nullable): The domain name. Example: `example.com`
- `available` (boolean, required): True when the domain can be reactivated online now.
- `reason` (string, required, nullable): Why reactivation is not available. Null when it is.
- `reasonCode` (string, required, nullable): Machine-readable form of `reason`. Null when reactivation is available.
  Allowed values: renewable_normally, not_openprovider, pricing_unavailable, not_restorable, restore_window_passed, already_in_progress
- `quote` (object, required, nullable): The price when `available` is true. Null otherwise.
- `reactivation` (object, required, nullable): The latest reactivation of the domain. Null when there is none.

### Responses

#### 200 - Whether the domain can be reactivated, the price and the latest reactivation.
```json
{
  "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "domainName": "example.com",
  "available": true,
  "reason": null,
  "reasonCode": null,
  "quote": {
    "restoreFeeAmount": 175,
    "renewalAmount": 169,
    "renewalYears": 1,
    "totalAmount": 344,
    "currencyCode": "SEK",
    "restorableUntil": "2026-08-30"
  },
  "reactivation": null
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request is invalid.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 401 - Unauthorized. Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 403 - Forbidden. The caller lacks a required scope or does not own the resource.
```json
{
  "type": "https://developer.hostup.se/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "The caller lacks a required scope or does not own the resource.",
  "code": "forbidden",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 404 - The domain was not found.
```json
{
  "type": "https://developer.hostup.se/errors/domain_not_found",
  "title": "Domain not found",
  "status": 404,
  "detail": "The requested domain could not be found.",
  "code": "domain_not_found",
  "instance": "/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/reactivation"
}
```

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Rate limit exceeded. Please try again later.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
