Skip to content

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

idstringrequired
The domain ID (dom_…).

Body (optional)

forceNewboolean
Make a new code even if one was made in the last 10 days. Default false.

Example

POST /api/v2/domains/{id}/actions/request-epp
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.

Response 200
{
"domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
"requestSubmitted": true,
"deliveryMethod": "unknown",
"codeSource": "fresh_request",
"generatedAt": "2026-06-16T17:30:00.000Z",
"eppCode": "Xk7#pQ2v-Lm9w"
}
Response fields
domainIdstring
requestSubmittedboolean
True when a new code was requested. False when an existing code was returned.
deliveryMethodstring
registry_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.
codeSourcestring
Where eppCode 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 null
When the returned code was made, if known.
eppCodestring or null
The EPP code. Null when it is not returned here.

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.
409No 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.
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.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.