Skip to content

Update a domain's contacts

POST /api/v2/domains/{id}/contacts

Change the contacts of a domain: the holder (registrant) and the admin, tech and billing contacts. Send at least one role with only the fields you change. Unknown fields are rejected. Check actions.canEditContacts on GET /api/v2/domains/{id}/contacts first. On .se, .nu and .test domains postal address fields are ignored. A body with only address fields returns 400 invalid_request there.

On .se, .nu and .test domains, changing the holder’s personal or organisation number needs BankID. Without it the other fields are saved and the number is kept. updateOutcome.registrantRegistrationIdentifierApplied is then false with the reason identity_verification_required.

A different Swedish personal or organisation number on a .se or .nu domain changes the registered holder. The domain stays in your account. Only the account owner can make this change, logged in to the client area. With an API key the call returns 409 holder_change_session_required. The change needs the current holder’s consent. It also needs acceptedRegistryTerms once the new holder has accepted the registry terms. Until both are in place the call returns 400 holder_change_verification_required. holderChange in the body lists what is missing.

The response is the updated contacts with updateOutcome.

Authentication: An API key with the scope write:domains. About keys and scopes

Request

Path parameters

idstringrequired
The domain ID (dom_…).

Body

registrantnull
adminnull
technull
billingnull
acceptedRegistryTermsarray of string
The registry terms accepted for a holder change on a .se or .nu domain, for example ["se_registration_terms"]. Send the key from holderChange.terms.key in the holder_change_verification_required problem after the holder has ticked the terms box. Ignored for ordinary contact changes.

Example

POST /api/v2/domains/{id}/contacts
curl -X POST "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/contacts" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"registrant": {
"firstName": "Alex",
"lastName": "Example",
"companyName": "Example AB",
"email": "alex@example.se",
"phoneNumber": "+46700000000",
"street": "Examplegatan 1",
"city": "Stockholm",
"postalCode": "12345",
"countryCode": "SE"
}
}'

Responses

200 The updated contacts with updateOutcome.

Response 200
{
"registrant": {
"firstName": "Alex",
"lastName": "Example",
"companyName": "Example AB",
"email": "alex@example.se",
"phoneNumber": "+46700000000",
"street": "Examplegatan 1",
"address2": null,
"city": "Stockholm",
"postalCode": "123 45",
"state": null,
"countryCode": "SE",
"registrationIdentifier": {
"value": "559000-1234",
"countryCode": "SE",
"type": "organization_number"
}
},
"admin": null,
"tech": null,
"billing": null,
"draft": false,
"serviceStatus": "active",
"contactDetailsVerification": null,
"actions": {
"canEditContacts": {
"allowed": true,
"reason": null
},
"requiresIdentityVerification": {
"allowed": true,
"reason": "BankID verification is required before updating the registrant's personal or organisation number."
}
},
"updateOutcome": {
"syncTriggered": false,
"orderActivation": null,
"registrantRegistrationIdentifierApplied": null,
"registrantRegistrationIdentifierBlockedReason": null,
"holderChanged": false
}
}
Response fields
registrantnull
adminnull
technull
billingnull
draftboolean
True while the domain’s registration is pending. The registrant can still be edited before payment and registration.
serviceStatusstring
The domain’s service status. One of active, suspended, expired, pending, cancelled, terminated, unknown.
contactDetailsVerificationnull
The registry’s request to check or update the contact details. Null when no review is needed now.
actionsobject
canEditContactsobject
False while the contacts are locked, for example during a transfer.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
requiresIdentityVerificationobject
allowed: true means identity verification is needed before the registrant’s personal identity number or organisation number can change. Today that is BankID, for .se, .nu and .test domains.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
updateOutcomenull

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.
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.