Delete a domain redirect
DELETE /api/v2/domains/{id}/redirects/{ruleId}
Deletes a URL redirect. Visitors are no longer forwarded. To pause a redirect without deleting it, send enabled: false with PATCH /api/v2/domains/{id}/redirects/{ruleId}. Deleting the last redirect of a domain removes the DNS records added for redirects. The records they replaced come back. A hostname that had none is left without a website record. rules[].removal on GET /api/v2/domains/{id}/redirects shows this before you delete. To remove a leftover rule found with include=orphans, pass its ID and add type=orphan.
Authentication: An API key with the scope write:domains. About keys and scopes
Request
Path parameters
idstringrequiredThe domain ID (
dom_…).ruleIdstringrequiredThe redirect ID (
redir_…) from rules[].id. With type=orphan, the ID from orphanedProxyRules[].id.Query parameters
typestringorphan to delete a leftover rule returned by include=orphans. One of orphan.Example
curl -X DELETE "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/redirects/redir_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
204 The redirect was deleted. No response body.
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 | The domain or the redirect was not found. |
| 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 | A leftover rule (type=orphan) could not be deleted right now. |
| 503 | Redirects cannot be managed right now. Try again later. |