Skip to content

Remove a domain from web hosting

DELETE /api/v2/shared-hosting/{accountId}/domains

Removes an addon domain or a subdomain from the web hosting account. Send the full hostname as GET /api/v2/shared-hosting/{accountId}/domains lists it with kind addon or sub. A name that is not an addon domain or subdomain of the account also returns 204 and nothing changes. That includes the main domain and parked domains. An account on Hostup’s previous hosting platform returns 409 account_not_eligible_cpanel. Support moves such an account to cPanel at no charge.

Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The hosting account ID (acct_…).

Body

domainstringrequired
Full hostname to remove, for example shop.example.com. Unicode IDN and punycode spellings are both accepted.

Example

DELETE /api/v2/shared-hosting/{accountId}/domains
curl -X DELETE "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/domains" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.net"
}'

Responses

204 The domain is removed. A name that is not an addon domain or subdomain of the account also gets 204.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400domain is missing or not a full hostname. The retired subdomain field also returns 400.
401Unauthorized. Authentication is required.
403The API key lacks a required scope or the hosting account is not active.
404Not found. The resource does not exist or is not owned by the caller.
409The account is on Hostup’s previous hosting platform. Domains cannot be managed there through the API.
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.
502The domain list or the removal failed on the server. Try again.