Get a domain's EPP code
POST /api/v2/domains/{id}/actions/request-epp
Get the EPP code (transfer code) you need to move a domain to another provider. The code is in eppCode when it can be read directly. A call within 10 days of the last new code returns that same code (codeSource: recent_request), because the new provider may already have it. Send forceNew: true to make a new code anyway. The old code then stops working. For .se and .nu domains deliveryMethod is registry_console. When eppCode is null there, the code is in the account where the domain is managed. An expired or deleted domain returns 409 epp_code_unavailable. So does a domain no longer managed by Hostup. Contacts on the account need permission to request EPP codes.
Authentication: An API key with the scopes read:domains and transfer:domains. About keys and scopes
Request
Path parameters
idstringrequireddom_…).Body (optional)
forceNewbooleanExample
curl -X POST "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/request-epp" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
200 The EPP code or where to find it.
{ "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3", "requestSubmitted": true, "deliveryMethod": "unknown", "codeSource": "fresh_request", "generatedAt": "2026-06-16T17:30:00.000Z", "eppCode": "Xk7#pQ2v-Lm9w"}Response fields
domainIdstringrequestSubmittedbooleandeliveryMethodstringregistry_console for .se and .nu: when eppCode is null, the code is in the account where the domain is managed. unknown for other domains: use eppCode. One of registry_console, unknown.codeSourcestringeppCode came from. fresh_request: a new code. recent_request: the code made in the last 10 days, returned again. current_code: the existing code, because a new one could not be made. One of fresh_request, recent_request, current_code.generatedAtstring or nulleppCodestring or nullErrors
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 | No code can be made or read (epp_code_unavailable). The domain may be expired or deleted. It may also no longer be managed by Hostup. Renew an expired domain first. |
| 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. |