Update domain settings

Update writable settings for one domain and return the refreshed domain detail. Get {id} from GET /api/v2/domains data[].id. The route accepts only boolean autoRenew, registrarLock, whoisPrivacyAutoEnable, and cancelPendingOrder; unknown fields are rejected. cancelPendingOrder: true is only valid with…

Read full description Hide full description

Update writable settings for one domain and return the refreshed domain detail. Get {id} from GET /api/v2/domains data[].id. The route accepts only boolean autoRenew, registrarLock, whoisPrivacyAutoEnable, and cancelPendingOrder; unknown fields are rejected. cancelPendingOrder: true is only valid with autoRenew: false in the same request and additionally requires write:billing. For domains whose registryLock.requiresManualUnlockFlow is true, disabling registrar lock is not a simple PATCH; call the registryLock.unlockAction.href returned by GET /api/v2/domains/{id} or GET /api/v2/domains/{id}/nameservers.

Domains & DNS Domains

Authentication

Required API scope: write:domains

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

Context

Path Parameters

id string required Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3

Public domain ID from `GET /api/v2/domains` `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Accept Example
Content-Type Example

Body

required
application/json
autoRenew boolean · Example: false

Enable or disable automatic renewal. Disabling always works; if a pending renewal order exists, first read `pendingRenewalOrder` and send `cancelPendingOrder: true` after user confirmation.

cancelPendingOrder boolean · Example: true

Best-effort cancellation of the current pending renewal order. Valid only together with `autoRenew: false` and requires billing write permission.

registrarLock boolean · Example: true

Enable or disable registry/registrar lock when the domain's action gates allow it.

whoisPrivacyAutoEnable boolean · Example: false

Save whether supported WHOIS privacy should be auto-enabled for this domain.

Responses

200 Updated domain details with mutation outcome metadata.
id string · Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3
name string · Example: example.com
serviceStatus string · enum · Example: active
active
suspended
terminated
pending
cancelled
expired
fraud
unknown
orderId string · Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m3
lifecycle object
lifecycle.type string required · Example: standard

Normalized lifecycle type. Common values are standard, registration, transfer, and renewal.

lifecycle.autoRenewEnabled booleannull required · Example: true
lifecycle.registrarLockEnabled booleannull required · Example: false
lifecycle.transferInProgress boolean required · Example: false
billing object
billing.amount number required · Example: 159
billing.currencyCode string required · Example: SEK
billing.billingCycle stringnull · enum required · Example: annually

Canonical cycle slug for 1-3 year periods. Four- to nine-year domain periods return null and use periodYears.

annually
biennially
triennially
billing.periodYears integernull required · Example: 1
billing.initialAmount number · Example: 99

First-period amount when it differs from the recurring amount.

createdAt stringnull · Example: 2025-04-27T09:00:00.000Z
expiresAt stringnull · Example: 2027-04-27T21:59:59.000Z
nextDueAt stringnull · Example: 2027-03-28T00:00:00.000Z
tags array<string> · Example: ["production"]
pinned boolean · Example: false
hostingConnection object
hostingConnection.type string · enum required · Example: hosting
standalone
hosting
wordpress
hostingConnection.hostingAccountId stringnull required · Example: acct_01hxa3b4c5d6e7f8g9h0j1k2m3
hostingConnection.hostingAccountName stringnull required · Example: Webbhotell Start
hostingConnection.hostingAccountDomain stringnull required · Example: example.com
hostingConnection.ssl objectnull required
nameservers array<string> · Example: ["primary.ns.hostup.se","secondary.ns.hostup.se"]
transfer object
transfer.eppCode stringnull required · Example: null

Always null on detail reads. EPP/auth codes are reusable secrets and are only exposed by explicit EPP actions.

notes stringnull · Example: null
pendingRenewalOrder null · Example: null
pendingDomainOrder null · Example: null
registryLock object
registryLock.enabled booleannull required · Example: false
registryLock.requiresManualUnlockFlow boolean required · Example: false
registryLock.unlockAction objectnull required
whoisPrivacy object
whoisPrivacy.enabled booleannull required · Example: null

Best-effort live registry privacy state. Null means the upstream detail payload did not expose the live flag.

whoisPrivacy.autoEnable boolean required · Example: true
whoisPrivacy.status string · enum required · Example: auto_enable_allowed
auto_enable_allowed
auto_enable_opted_out
whoisPrivacy.reason stringnull required · Example: null
whoisPrivacy.updatedAt stringnull required · Example: 2026-04-20T09:30:00.000Z
actions object
actions.canDelete object required
actions.canDelete.allowed boolean required · Example: true
actions.canDelete.reason stringnull required · Example: null
actions.canDelete.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

actions.canActivateRegistryLock object required
actions.canActivateRegistryLock.allowed boolean required · Example: true
actions.canActivateRegistryLock.reason stringnull required · Example: null
actions.canActivateRegistryLock.code stringnull · enum · Example: null
tld_not_supported
lock_already_active
domain_not_active
actions.canRequestRegistryUnlock object required
actions.canRequestRegistryUnlock.allowed boolean required · Example: true
actions.canRequestRegistryUnlock.reason stringnull required · Example: null
actions.canRequestRegistryUnlock.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

actions.canChangeBillingCycle object required
actions.canChangeBillingCycle.allowed boolean required · Example: true
actions.canChangeBillingCycle.reason stringnull required · Example: null
actions.canChangeBillingCycle.code stringnull · Example: pending_domain_order
actions.canDisableAutoRenew object required
actions.canDisableAutoRenew.allowed boolean required · Example: true
actions.canDisableAutoRenew.reason stringnull required · Example: null
actions.canDisableAutoRenew.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

actions.canDisableAutoRenew.requiresConfirmation stringnull · enum required · Example: null
cancel_pending_order
updateOutcome object
updateOutcome.pendingOrderCancelled booleannull required · Example: true

True when `cancelPendingOrder: true` cancelled a pending renewal order; false when the cancel was attempted but no order was cancelled; null when no pending-order cancel was requested.

updateOutcome.whoisPrivacyAutoEnableUpdated booleannull required · Example: null

The saved WHOIS privacy auto-enable preference, or null when the PATCH did not update that preference.

updateOutcome.syncTriggered boolean required · Example: false

True when the server had to refresh domain status before retrying the upstream write.

updateOutcome.domainStatusChanged boolean required · Example: false

True when the refresh detected that the domain status changed during the update.

400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Forbidden. The caller lacks a required scope or does not own the resource.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
PATCH https://cloud.hostup.se/api/v2/domains/{id}
For AI assistants
View as Markdown
cURL
curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "autoRenew": false,
    "cancelPendingOrder": true
  }'
Response
{
  "id": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "name": "example.com",
  "serviceStatus": "active",
  "orderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "lifecycle": {
    "type": "registration",
    "autoRenewEnabled": false,
    "registrarLockEnabled": false,
    "transferInProgress": false
  },
  "billing": {
    "amount": 159,
    "currencyCode": "SEK",
    "billingCycle": "annually",
    "periodYears": 1
  },
  "createdAt": "2025-04-27T09:00:00.000Z",
  "expiresAt": "2027-04-27T21:59:59.000Z",
  "nextDueAt": "2027-03-28T00:00:00.000Z",
  "tags": [
    "production"
  ],
  "pinned": false,
  "hostingConnection": {
    "type": "hosting",
    "hostingAccountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "hostingAccountName": "Webbhotell Start",
    "hostingAccountDomain": "example.com",
    "ssl": {
      "status": "valid",
      "expiresAt": "2026-08-01T00:00:00.000Z",
      "issuer": "Let's Encrypt"
    }
  },
  "nameservers": [
    "primary.ns.hostup.se",
    "secondary.ns.hostup.se"
  ],
  "transfer": {
    "eppCode": null
  },
  "notes": null,
  "pendingRenewalOrder": null,
  "pendingDomainOrder": null,
  "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": "Registry lock activation is not available for this domain ending.",
      "code": "tld_not_supported"
    },
    "canRequestRegistryUnlock": {
      "allowed": false,
      "reason": "Domain lock is not active."
    },
    "canChangeBillingCycle": {
      "allowed": true,
      "reason": null
    },
    "canDisableAutoRenew": {
      "allowed": true,
      "reason": null,
      "requiresConfirmation": null
    }
  },
  "updateOutcome": {
    "pendingOrderCancelled": true,
    "whoisPrivacyAutoEnableUpdated": null,
    "syncTriggered": false,
    "domainStatusChanged": false
  }
}
Request Body Disable auto-renew and cancel pending renewal order
{
  "autoRenew": false,
  "cancelPendingOrder": true
}