Delete a domain
DELETE /api/v2/domains/{id}
Remove a domain from your account. Check actions.canDelete on GET /api/v2/domains/{id} first. When it is not allowed, the call returns 409 domain_delete_blocked with the same gate in actions.canDelete and the reason in detail. A pending renewal or registration order for the domain is cancelled before the domain is removed. The gate then has the code pending_order_will_be_cancelled. The domain is then no longer listed in your account or renewed. You cannot undo this through the API. Contacts on the account cannot delete domains. They get 403.
Authentication: An API key with the scope delete:domains. About keys and scopes
Request
Path parameters
idstringrequiredThe domain ID (
dom_…).Example
curl -X DELETE "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
204 The domain was removed from your account.
Errors
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 domain cannot be deleted right now (domain_delete_blocked). actions.canDelete.code says why: registry_lock_active, pending_order_paid, pending_order_outstanding_invoice, pending_order_unverified, pending_order_invoice_unverified, account_currency_unavailable or mixed_currency_credit. |
| 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. |