Skip to content

Get a domain's contacts

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

Get the contacts of a domain: the holder (registrant) and the admin, tech and billing contacts. A role without a contact is null. registrationIdentifier gives the holder’s personal or organisation number as value, countryCode and type. actions.canEditContacts says whether you can change them now with POST /api/v2/domains/{id}/contacts. actions.requiresIdentityVerification says whether BankID is needed to change the holder’s number, as on .se, .nu and .test domains. A domain that has moved to another provider returns 409 domain_not_eligible. So does a domain whose contacts cannot be read in its current state.

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

Request

Path parameters

idstringrequired
The domain ID (dom_…).

Example

GET /api/v2/domains/{id}/contacts
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/contacts" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The domain’s contacts.

Response 200
{
"registrant": {
"firstName": "Alex",
"lastName": "Example",
"companyName": "Example AB",
"email": "alex@example.se",
"phoneNumber": "+46700000000",
"street": "Examplegatan 1",
"address2": "29",
"city": "Stockholm",
"postalCode": "123 45",
"state": "Stockholm",
"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": null
}
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.
409The contacts cannot be read (domain_not_eligible). reason is domain_transferred_out when the domain has moved to another provider.
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.