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
idstringrequireddom_…).Example
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/contacts" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The domain’s contacts.
{ "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
registrantnulladminnulltechnullbillingnulldraftbooleanserviceStatusstringactive, suspended, expired, pending, cancelled, terminated, unknown.contactDetailsVerificationnullactionsobjectcanEditContactsobjectallowedbooleanreasonstring or nullcodestring or nullrequiresIdentityVerificationobjectallowed: 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.allowedbooleanreasonstring or nullcodestring or nullupdateOutcomenullErrors
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 contacts cannot be read (domain_not_eligible). reason is domain_transferred_out when the domain has moved to another provider. |
| 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. |