/api/v2/domains/{id}/redirects/{ruleId} Partially update a saved URL redirect rule.
Get {id} from GET /api/v2/domains data[].id and {ruleId} from GET /api/v2/domains/{id}/redirects rules[].id.
All request fields are optional, but at least one meaningful field should be sent.
If sourceUrl is changed, its host must still belong to the same domain.
sourceUrl and targetUrl may use Unicode IDN hostnames or punycode; responses return IDN hostnames in Unicode form.
Use enabled: false to pause a redirect without deleting it; use DELETE only when the rule should be removed.
Absent includeSubpaths/preservePath keep the stored values.
A target that the rule itself matches (for example root_www on example.com with includeSubpaths: true and target https://www.example.com/) is rejected with 400 invalid_request and errors[].code: "redirect_loop" on /targetUrl.
write:domains
Authenticate with an API key in the Authorization: Bearer <token> header.
id string required
Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3 Public domain ID from GET /api/v2/domains data[].id. Do not invent this value; use the exact ID returned by the referenced API response.
ruleId string required
Example: redir_01hxa3b4c5d6e7f8g9h0j1k2m3 Public redirect rule ID from GET /api/v2/domains/{id}/redirects rules[].id. Do not invent this value; use the exact ID returned by the referenced API response.
Authorization Bearer <token> Accept application/json Content-Type application/json sourceUrl string
· Example: https://www.example.com Source URL on the owned domain or one of its subdomains. Unicode IDN and punycode hostnames are both accepted.
targetUrl string
· Example: https://example.com Absolute destination URL. Unicode IDN and punycode hostnames are both accepted.
httpStatusCode integer · enum
· Example: 302 301 302 307 308 scope string · enum
· Example: exact exact root_www subdomains all preserveQuery boolean
· Example: true includeSubdomains boolean
· Example: false includeSubpaths boolean
· Example: true Redirect every page below the source address too. Absent keeps the stored value.
preservePath boolean
· Example: true Send each page to the same path on the target. Absent keeps the stored value; true implies includeSubpaths: true; includeSubpaths: false drops it.
description string · nullable
· Example: Temporary campaign redirect enabled boolean
· Example: false id string
· Example: redir_01hxa3b4c5d6e7f8g9h0j1k2m3 domainId string
· Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3 sourceHost string
· Example: www.example.com Human-readable source host. IDN/punycode hostnames are returned in Unicode form.
sourcePath string · nullable
· Example: null sourceUrl string
· Example: https://www.example.com Source URL with any IDN hostname returned in Unicode form.
targetUrl string
· Example: https://example.com Target URL with any IDN hostname returned in Unicode form.
httpStatusCode integer · enum
· Example: 301 301 302 307 308 scope string · enum
· Example: root_www exact root_www subdomains all includeSubpaths boolean
· Example: true Every page below the source address is redirected too, not only the source address itself.
preservePath boolean
· Example: false Each matched page goes to the same path on the target. Only true together with includeSubpaths.
preserveQuery boolean
· Example: false includeSubdomains boolean
· Example: false status string · enum
· Example: active active pending_dns error disabled reason string · nullable
· Example: null description string · nullable
· Example: Redirect www to apex createdAt string · nullable
· Example: 2026-04-27T12:00:00.000Z updatedAt string · nullable
· Example: 2026-04-27T12:00:00.000Z type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object code names the missing resource: domain_not_found, redirect_not_found. 10 fields type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object Retry-After seconds plus X-RateLimit-* headers. 10 fields type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on detail.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when code is invalid_request.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object https://cloud.hostup.se/api/v2/domains/{id}/redirects/{ruleId} curl -X PATCH "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/redirects/redir_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://example.com/new-home",
"httpStatusCode": 302
}' {
"id": "redir_01hxa3b4c5d6e7f8g9h0j1k2m3",
"domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
"sourceHost": "www.example.com",
"sourcePath": null,
"sourceUrl": "https://www.example.com",
"targetUrl": "https://example.com/new-home",
"httpStatusCode": 302,
"scope": "exact",
"includeSubpaths": false,
"preservePath": false,
"preserveQuery": false,
"includeSubdomains": false,
"status": "active",
"reason": null,
"description": "Temporary campaign redirect",
"createdAt": "2026-04-27T12:00:00.000Z",
"updatedAt": "2026-04-27T12:30:00.000Z"
} {
"targetUrl": "https://example.com/new-home",
"httpStatusCode": 302
}