Create a BankID verification link
POST /api/v2/domains/{id}/verification
Creates a link where the domain holder verifies their identity with BankID. Share it with the holder or with a signatory of the holder company. The link is valid for 7 days. A new link replaces any earlier unused link for the domain. Once it is used, GET /api/v2/domains/{id}/verification returns verified: true and the holder’s personal or organisation number can be changed. Only active .se, .nu and .test domains with a personal or organisation number on file are supported. The body is empty or names contactType: "registrant".
Authentication: An API key with the scope write:domains. About keys and scopes
Request
Path parameters
idstringrequiredThe domain ID. From
GET /api/v2/domains.Body (optional)
contactTypestringThe contact to verify. Only
registrant (the domain holder), which is also the default. One of registrant.Example
curl -X POST "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/verification" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contactType": "registrant" }'curl -X POST "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/verification" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
201 The verification link was created.
{ "link": "https://cloud.hostup.se/domain-verify/AbCdEf0123456789AbCdEf0123456789AbCdEf0123456789AbCdEf012345", "path": "/domain-verify/AbCdEf0123456789AbCdEf0123456789AbCdEf0123456789AbCdEf012345", "expiresAt": "2026-05-04T12:00:00.000Z", "domainName": "example.se"}Response fields
linkstring | nullThe full verification URL.
pathstring | nullThe same link without the host.
expiresAtstring | nullWhen the link stops working, 7 days after it was created.
domainNamestring | nullThe domain name.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The body has an unknown field. Also returned for a domain outside .se, .nu and .test and for a domain without a personal or organisation number on file. |
| 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 | Conflict. code is account_suspended, or a route-specific blocker with its own recovery fields. |
| 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. |