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

**Get domain details**

Return one domain with contacts, lifecycle, nameservers, transfer state, billing, and action gates. `{id}` is the public `dom_...` ID returned by `GET /api/v2/domains` `data[].id`; do not pass a raw hostname such as `example.com` in this path. To find a domain by name, list domains first and match `data[].name`.

### Related Endpoints

- `PATCH /api/v2/domains/{id}`: Update domain settings
- `GET /api/v2/domains/{id}/renewal`: Get domain renewal state
- `GET /api/v2/domains/{id}/nameservers`: Get domain nameservers

### Headers

- `Accept`: application/json
- `Authorization`: Bearer YOUR_API_KEY
- Required API scope: `read:domains`

### Parameters

- `id` (path, string, required): Public domain ID. Get it from GET /api/v2/domains `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response. Example: `dom_01hxa3b4c5d6e7f8g9h0j1k2m3`

### Request Example

```bash
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```

### Response Schema

- `id` (string, optional) Example: `dom_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `name` (string, optional) Example: `example.com`
- `serviceStatus` (string, optional) Example: `active`
  Allowed values: active, suspended, terminated, pending, cancelled, expired, fraud, unknown
- `orderId` (string, optional) Example: `ord_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `lifecycle` (object, optional)
- `lifecycle.type` (string, required): Normalized lifecycle type. Common values are standard, registration, transfer, and renewal. Example: `standard`
- `lifecycle.autoRenewEnabled` (boolean,null, required) Example: `true`
- `lifecycle.registrarLockEnabled` (boolean,null, required) Example: `false`
- `lifecycle.transferInProgress` (boolean, required) Example: `false`
- `billing` (object, optional)
- `billing.amount` (number, required) Example: `159`
- `billing.currencyCode` (string, required) Example: `SEK`
- `billing.billingCycle` (string,null, required): Canonical cycle slug for 1-3 year periods. Four- to nine-year domain periods return null and use periodYears. Example: `annually`
  Allowed values: annually, biennially, triennially, 
- `billing.periodYears` (integer,null, required) Example: `1`
- `billing.initialAmount` (number, optional): First-period amount when it differs from the recurring amount. Example: `99`
- `createdAt` (string,null, optional) Example: `2025-04-27T09:00:00.000Z`
- `expiresAt` (string,null, optional) Example: `2027-04-27T21:59:59.000Z`
- `nextDueAt` (string,null, optional) Example: `2027-03-28T00:00:00.000Z`
- `tags` (array<string>, optional) Example: `["production"]`
- `pinned` (boolean, optional) Example: `false`
- `hostingConnection` (object, optional)
- `hostingConnection.type` (string, required) Example: `hosting`
  Allowed values: standalone, hosting, wordpress
- `hostingConnection.hostingAccountId` (string,null, required) Example: `acct_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `hostingConnection.hostingAccountName` (string,null, required) Example: `Webbhotell Start`
- `hostingConnection.hostingAccountDomain` (string,null, required) Example: `example.com`
- `hostingConnection.ssl` (object,null, required)
- `nameservers` (array<string>, optional) Example: `["primary.ns.hostup.se","secondary.ns.hostup.se"]`
- `transfer` (object, optional)
- `transfer.eppCode` (string,null, required): Always null on detail reads. EPP/auth codes are reusable secrets and are only exposed by explicit EPP actions. Example: `null`
- `notes` (string,null, optional) Example: `null`
- `pendingRenewalOrder` (null, optional) Example: `null`
- `pendingDomainOrder` (null, optional) Example: `null`
- `registryLock` (object, optional)
- `registryLock.enabled` (boolean,null, required) Example: `false`
- `registryLock.requiresManualUnlockFlow` (boolean, required) Example: `false`
- `registryLock.unlockAction` (object,null, required)
- `whoisPrivacy` (object, optional)
- `whoisPrivacy.enabled` (boolean,null, required): Best-effort live registry privacy state. Null means the upstream detail payload did not expose the live flag. Example: `null`
- `whoisPrivacy.autoEnable` (boolean, required) Example: `true`
- `whoisPrivacy.status` (string, required) Example: `auto_enable_allowed`
  Allowed values: auto_enable_allowed, auto_enable_opted_out
- `whoisPrivacy.reason` (string,null, required) Example: `null`
- `whoisPrivacy.updatedAt` (string,null, required) Example: `2026-04-20T09:30:00.000Z`
- `actions` (object, optional)
- `actions.canDelete` (object, required)
- `actions.canDelete.allowed` (boolean, required) Example: `true`
- `actions.canDelete.reason` (string,null, required) Example: `null`
- `actions.canDelete.code` (string,null, optional): Machine-readable reason code when an action is blocked. Example: `pending_order`
- `actions.canActivateRegistryLock` (object, required)
- `actions.canActivateRegistryLock.allowed` (boolean, required) Example: `true`
- `actions.canActivateRegistryLock.reason` (string,null, required) Example: `null`
- `actions.canActivateRegistryLock.code` (string,null, optional) Example: `null`
  Allowed values: tld_not_supported, lock_already_active, domain_not_active, 
- `actions.canRequestRegistryUnlock` (object, required)
- `actions.canRequestRegistryUnlock.allowed` (boolean, required) Example: `true`
- `actions.canRequestRegistryUnlock.reason` (string,null, required) Example: `null`
- `actions.canRequestRegistryUnlock.code` (string,null, optional): Machine-readable reason code when an action is blocked. Example: `pending_order`
- `actions.canChangeBillingCycle` (object, required)
- `actions.canChangeBillingCycle.allowed` (boolean, required) Example: `true`
- `actions.canChangeBillingCycle.reason` (string,null, required) Example: `null`
- `actions.canChangeBillingCycle.code` (string,null, optional) Example: `pending_domain_order`
- `actions.canDisableAutoRenew` (object, required)
- `actions.canDisableAutoRenew.allowed` (boolean, required) Example: `true`
- `actions.canDisableAutoRenew.reason` (string,null, required) Example: `null`
- `actions.canDisableAutoRenew.code` (string,null, optional): Machine-readable reason code when an action is blocked. Example: `pending_order`
- `actions.canDisableAutoRenew.requiresConfirmation` (string,null, required) Example: `null`
  Allowed values: cancel_pending_order, 

### Responses

#### 200 - Domain details.
```json
{
  "id": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "name": "example.com",
  "serviceStatus": "pending",
  "orderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "lifecycle": {
    "type": "transfer",
    "autoRenewEnabled": true,
    "registrarLockEnabled": false,
    "transferInProgress": true
  },
  "billing": {
    "amount": 159,
    "currencyCode": "SEK",
    "billingCycle": "annually",
    "periodYears": 1
  },
  "createdAt": "2026-04-27T12:34:56.000Z",
  "expiresAt": "2027-04-27T00:00:00.000Z",
  "nextDueAt": "2027-04-27T00:00:00.000Z",
  "tags": [
    "production"
  ],
  "pinned": false,
  "hostingConnection": {
    "type": "standalone",
    "hostingAccountId": null,
    "hostingAccountName": null,
    "hostingAccountDomain": null,
    "ssl": null
  },
  "nameservers": [
    "primary.ns.hostup.se",
    "secondary.ns.hostup.se"
  ],
  "transfer": {
    "eppCode": null
  },
  "notes": null,
  "pendingRenewalOrder": null,
  "pendingDomainOrder": {
    "id": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "orderNumber": "1072061075",
    "invoiceId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "invoiceNumber": "202600001",
    "proformaId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "invoiceStatus": "unpaid",
    "amount": 159,
    "currencyCode": "SEK",
    "createdAt": "2026-04-27T12:34:56.000Z",
    "dueAt": "2026-04-27T12:34:56.000Z",
    "blockers": [
      "outstanding_invoice"
    ]
  },
  "registryLock": {
    "enabled": false,
    "requiresManualUnlockFlow": false,
    "unlockAction": null
  },
  "whoisPrivacy": {
    "enabled": null,
    "autoEnable": true,
    "status": "auto_enable_allowed",
    "reason": null,
    "updatedAt": "2026-04-20T09:30:00.000Z"
  },
  "actions": {
    "canDelete": {
      "allowed": true,
      "reason": null
    },
    "canActivateRegistryLock": {
      "allowed": false,
      "reason": "Domain must be active before registry lock can be enabled.",
      "code": "domain_not_active"
    },
    "canRequestRegistryUnlock": {
      "allowed": false,
      "reason": "Domain lock is not active."
    },
    "canChangeBillingCycle": {
      "allowed": false,
      "reason": "This domain has a pending order or invoice. Complete or cancel it before changing the billing period.",
      "code": "pending_domain_order"
    },
    "canDisableAutoRenew": {
      "allowed": true,
      "reason": null,
      "requiresConfirmation": 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 body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/items/0/domainName",
      "detail": "`domainName` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 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 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 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": "Too many requests. Retry after the limit resets.",
  "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"
}
```
