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 409auto_renew_unavailable. - Auto-renewal off always works. When
actions.canDisableAutoRenew.requiresConfirmationiscancel_pending_order, the domain has an unpaid renewal order. AddcancelPendingOrder: trueto cancel it in the same call. A paid renewal is never cancelled. Contacts on the account need permission to place orders to cancel it. WhenrequiresConfirmationisregistry_lock_removal, the .se or .nu registry lock will be removed before the domain expires.registryLock.renewalDeadlineAtshows 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 409registry_lock_dnssec_incomplete. Add the DS record first. To lock the domain as it is, sendacceptIncompleteDnssec: 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 inregistryLock.unlockAction.hrefinstead.
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
idstringrequiredThe domain ID (
dom_…).Body
acceptIncompleteDnssecbooleanLock the domain although its DNSSEC is incomplete. Only together with
registrarLock: true.autoRenewbooleanTurn automatic renewal on or off.
cancelPendingOrderbooleanAlso cancel the domain’s unpaid renewal order. Only together with
autoRenew: false.registrarLockbooleanTurn the registry lock on or off.
whoisPrivacyAutoEnablebooleanWhether WHOIS privacy is turned on automatically for this domain. Default true.
Example
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 }'curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "registrarLock": true }'curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "registrarLock": true, "acceptIncompleteDnssec": true }'curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "whoisPrivacyAutoEnable": false }'Responses
200 The updated domain with updateOutcome.
{ "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
idstringnamestringThe domain name. Internationalised names are in Unicode form.
serviceStatusstringOne of
active, suspended, terminated, pending, cancelled, expired, fraud, transferred_out, unknown.actionRequiredbooleanTrue 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 nullTrue 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.
orderIdstringThe order that created the domain. Left out when it is not known.
lifecycleobjecttypestringThe kind of lifecycle. Common values are
standard, registration, transfer and renewal.autoRenewEnabledboolean or nullWhether the domain renews automatically. Always false while the domain is pending. Null when not known.
registrarLockEnabledboolean or nulltransferInProgressbooleanTrue while a transfer to Hostup is in progress. Follow it on
GET /api/v2/domains/{id}/lifecycle.billingobjectamountnumberRenewal price for one billing period, in
currencyCode.currencyCodestringbillingCyclestring or nullThe 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 null1 to 9.
initialAmountnumberPrice of the first period, when it differs from the renewal price.
createdAtstring or nullexpiresAtstring or nullnextDueAtstring or nullWhen the next renewal payment is due.
tagsarray of stringpinnedbooleancontactDetailsVerificationnullThe 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.hostingConnectionobjecttypestringOne of
standalone, hosting, wordpress.hostingAccountIdstring or nullhostingAccountNamestring or nullhostingAccountDomainstring or nullsslobject or nullnameserversarray of stringtransferobjecteppCodestring or nullAlways null here. The EPP code is a reusable secret. Get it with
POST /api/v2/domains/{id}/actions/request-epp.notesstring or nullpendingRenewalOrdernullpendingDomainOrdernullregistryLockobjectenabledboolean or nullrequiresManualUnlockFlowbooleanunlockActionobject or nullpausedByHostupboolean.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.
whoisPrivacyobjectenabledboolean or nullWhether WHOIS privacy is on at the registry. Null when the registry did not report it.
autoEnablebooleanstatusstringOne of
auto_enable_allowed, auto_enable_opted_out.reasonstring or nullupdatedAtstring or nullactionsobjectcanDeleteobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canActivateRegistryLockobjectallowedbooleanreasonstring or nullcodestring or nullcanRequestRegistryUnlockobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canRenewNowobjectWhether
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.allowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canEditContactsobjectWhether the contacts can change now. False while they are locked, for example during a transfer.
allowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canChangeBillingCycleobjectallowedbooleanreasonstring or nullcodestring or nullcanEnableAutoRenewobjectallowedbooleanreasonstring or nullcodestring or nullOne of
domain_not_active, domain_transferred_out.canDisableAutoRenewobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
requiresConfirmationstring or nullOne of
cancel_pending_order, registry_lock_removal.updateOutcomeobjectpendingOrderCancelledboolean or nullTrue when
cancelPendingOrder: true cancelled a pending renewal order. False when no order was cancelled. Null when no cancel was asked for.whoisPrivacyAutoEnableUpdatedboolean or nullThe saved setting for turning on WHOIS privacy automatically. Null when the PATCH did not change it.
syncTriggeredbooleanTrue when the server had to refresh the domain status before trying the change again.
domainStatusChangedbooleanTrue 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.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is domain_not_found. |
| 409 | The 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. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |