Skip to content

Update a domain's settings

PATCH /api/v2/domains/{id}

Change a domain’s auto-renewal, registry lock or automatic WHOIS privacy. Send only the fields you want to change. The response is the updated domain, as GET /api/v2/domains/{id} returns it, plus updateOutcome.

  • Auto-renewal on needs actions.canEnableAutoRenew. While the domain is still pending, the call returns 409 auto_renew_unavailable.
  • Auto-renewal off always works. When actions.canDisableAutoRenew.requiresConfirmation is cancel_pending_order, the domain has an unpaid renewal order. Add cancelPendingOrder: true to cancel it in the same call. A paid renewal is never cancelled. Contacts on the account need permission to place orders to cancel it. When requiresConfirmation is registry_lock_removal, the .se or .nu registry lock will be removed before the domain expires. registryLock.renewalDeadlineAt shows the day once expiry is near.
  • Registry lock on needs actions.canActivateRegistryLock. On a .se or .nu domain the lock also stops DS record changes at the registry. If the zone is signed but the registry does not have a matching DS record yet, the call returns 409 registry_lock_dnssec_incomplete. Add the DS record first. To lock the domain as it is, send acceptIncompleteDnssec: true.
  • Registry lock off on a .se or .nu domain is a separate request. The call returns 409 registry_lock_unlock_required. Use the request in registryLock.unlockAction.href instead.

Authentication: An API key with the scope write:domains. Also write:billing: only when the body sets cancelPendingOrder: true. About keys and scopes

Request

Path parameters

idstringrequired
The domain ID (dom_…).

Body

acceptIncompleteDnssecboolean
Lock the domain although its DNSSEC is incomplete. Only together with registrarLock: true.
autoRenewboolean
Turn automatic renewal on or off.
cancelPendingOrderboolean
Also cancel the domain’s unpaid renewal order. Only together with autoRenew: false.
registrarLockboolean
Turn the registry lock on or off.
whoisPrivacyAutoEnableboolean
Whether WHOIS privacy is turned on automatically for this domain. Default true.

Example

PATCH /api/v2/domains/{id}
curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"autoRenew": false,
"cancelPendingOrder": true
}'

Responses

200 The updated domain with updateOutcome.

Response 200
{
"id": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
"name": "example.com",
"serviceStatus": "active",
"actionRequired": false,
"awaitingPayment": false,
"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,
"contactDetailsVerification": null,
"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,
"pausedByHostup": false,
"renewalDeadlineAt": null,
"renewalUnpaid": false
},
"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": true,
"reason": null
},
"canRequestRegistryUnlock": {
"allowed": false,
"reason": "Registry-lock unlock requests are only available for .se and .nu domains."
},
"canRenewNow": {
"allowed": true,
"reason": null
},
"canEditContacts": {
"allowed": true,
"reason": null
},
"canChangeBillingCycle": {
"allowed": true,
"reason": null
},
"canEnableAutoRenew": {
"allowed": true,
"reason": null
},
"canDisableAutoRenew": {
"allowed": true,
"reason": null,
"requiresConfirmation": null
}
},
"updateOutcome": {
"pendingOrderCancelled": true,
"whoisPrivacyAutoEnableUpdated": null,
"syncTriggered": false,
"domainStatusChanged": false
}
}
Response fields
idstring
namestring
The domain name. Internationalised names are in Unicode form.
serviceStatusstring
One of active, suspended, terminated, pending, cancelled, expired, fraud, transferred_out, unknown.
actionRequiredboolean
True when you must act before the domain can be processed further. Old registration failures stop counting once the domain is no longer pending registration. GET /api/v2/domains/{id}/lifecycle gives the reason and the way to fix it.
awaitingPaymentboolean or null
True when the registration or transfer order of this pending domain has an unpaid invoice. False for a domain that is not pending. Also false when no unpaid order was found. Null when the payment check failed or took too long. Null does not mean paid. No extra order or invoice request is needed.
orderIdstring
The order that created the domain. Left out when it is not known.
lifecycleobject
typestring
The kind of lifecycle. Common values are standard, registration, transfer and renewal.
autoRenewEnabledboolean or null
Whether the domain renews automatically. Always false while the domain is pending. Null when not known.
registrarLockEnabledboolean or null
transferInProgressboolean
True while a transfer to Hostup is in progress. Follow it on GET /api/v2/domains/{id}/lifecycle.
billingobject
amountnumber
Renewal price for one billing period, in currencyCode.
currencyCodestring
billingCyclestring or null
The billing cycle for a period of 1 to 3 years. Null for 4 to 9 years. Read periodYears then. One of annually, biennially, triennially.
periodYearsinteger or null
1 to 9.
initialAmountnumber
Price of the first period, when it differs from the renewal price.
createdAtstring or null
expiresAtstring or null
nextDueAtstring or null
When the next renewal payment is due.
tagsarray of string
pinnedboolean
contactDetailsVerificationnull
The current contact-details warning for this domain. Null when no update is needed. Otherwise an object with reason (text to show), deadlineAt, renewalBlocked, serviceInterruptionRisk and actions.canUpdateContacts.
hostingConnectionobject
typestring
One of standalone, hosting, wordpress.
hostingAccountIdstring or null
hostingAccountNamestring or null
hostingAccountDomainstring or null
sslobject or null
nameserversarray of string
transferobject
eppCodestring or null
Always null here. The EPP code is a reusable secret. Get it with POST /api/v2/domains/{id}/actions/request-epp.
notesstring or null
pendingRenewalOrdernull
pendingDomainOrdernull
registryLockobject
enabledboolean or null
requiresManualUnlockFlowboolean
unlockActionobject or null
pausedByHostupboolean
.se and .nu only. True while Hostup has removed the registry lock because the renewal is unpaid. The lock comes back automatically once the renewal is paid.
renewalDeadlineAtstring or null
.se and .nu only. The day the registry lock is removed unless the renewal is paid: 7 days before expiry. With auto-renew off, 30 days before expiry. Set only while the domain is locked and within 60 days of expiry.
renewalUnpaidboolean
.se and .nu only. A renewal invoice for the current period is unpaid.
whoisPrivacyobject
enabledboolean or null
Whether WHOIS privacy is on at the registry. Null when the registry did not report it.
autoEnableboolean
statusstring
One of auto_enable_allowed, auto_enable_opted_out.
reasonstring or null
updatedAtstring or null
actionsobject
canDeleteobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canActivateRegistryLockobject
allowedboolean
reasonstring or null
codestring or null
One of tld_not_supported, lock_already_active, domain_not_active, renewal_unpaid.
canRequestRegistryUnlockobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canRenewNowobject
Whether POST /api/v2/domains/{id}/actions/renew can run now. code says why not, for example pending_renewal_order, not_renewable, max_renewal_period_exceeded, renewal_eligibility_unavailable, registry_contact_verification_required or nordic_guard_blocked.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canEditContactsobject
Whether the contacts can change now. False while they are locked, for example during a transfer.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canChangeBillingCycleobject
allowedboolean
reasonstring or null
codestring or null
canEnableAutoRenewobject
allowedboolean
reasonstring or null
codestring or null
One of domain_not_active, domain_transferred_out.
canDisableAutoRenewobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
requiresConfirmationstring or null
One of cancel_pending_order, registry_lock_removal.
updateOutcomeobject
pendingOrderCancelledboolean or null
True when cancelPendingOrder: true cancelled a pending renewal order. False when no order was cancelled. Null when no cancel was asked for.
whoisPrivacyAutoEnableUpdatedboolean or null
The saved setting for turning on WHOIS privacy automatically. Null when the PATCH did not change it.
syncTriggeredboolean
True when the server had to refresh the domain status before trying the change again.
domainStatusChangedboolean
True when that refresh found the domain status had changed during the update.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is domain_not_found.
409The change conflicts with the domain’s state. auto_renew_unavailable: the domain is not active yet. registry_lock_activation_blocked: the lock cannot be turned on; actions.canActivateRegistryLock in the body says why. registry_lock_unlock_required: a .se or .nu lock is removed through registryLock.unlockAction.href. registry_lock_dnssec_incomplete: the lock would stop DNSSEC from being completed. dnssec.status is ds_missing or ds_mismatch. dnssec.usesHostupNameservers is true when the domain uses Hostup’s nameservers.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.