List domain redirects

Return URL redirect rules for one domain plus the per-domain rule limit and create gate. Get {id} from GET /api/v2/domains data[].id. Redirects are not DNS records: create, update, and delete them through the redirect routes, not by writing A/AAAA/CNAME records directly. The API prepares the DNS anchor records a…

Read full description Hide full description

Return URL redirect rules for one domain plus the per-domain rule limit and create gate. Get {id} from GET /api/v2/domains data[].id. Redirects are not DNS records: create, update, and delete them through the redirect routes, not by writing A/AAAA/CNAME records directly. The API prepares the DNS anchor records a redirect needs; deleting or replacing those records can make existing redirects stop working. Use include=orphans only when repairing active redirect/proxy rules with no saved redirect row. Redirects can be saved before DNS is fully ready; a rule may show status: "pending_dns" until nameservers/DNS are correct.

Domains & DNS Redirects

Authentication

Required API scope: read:domains

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

Context

Path Parameters

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.

Query Parameters

include string · enum · Example: orphans

Optional repair view that includes upstream proxy rules not represented by saved redirect rows.

orphans

Headers

Accept Example
Content-Type Example

Responses

200 Redirect rules and create gate.
domainId string · Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3
rules array<object>
rules[].id string required · Example: redir_01hxa3b4c5d6e7f8g9h0j1k2m3
rules[].domainId string required · Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3
rules[].sourceHost string required · Example: www.example.com
rules[].sourcePath stringnull required · Example: null
rules[].sourceUrl string required · Example: https://www.example.com
rules[].targetUrl string required · Example: https://example.com
rules[].httpStatusCode integer · enum required · Example: 301
301
302
307
308
rules[].scope string · enum required · Example: root_www
exact
root_www
subdomains
all
rules[].preservePath boolean required · Example: false
rules[].preserveQuery boolean required · Example: false
rules[].includeSubdomains boolean required · Example: false
rules[].status string · enum required · Example: active
active
pending_dns
error
disabled
rules[].reason stringnull required · Example: null
rules[].description stringnull required · Example: Redirect www to apex
rules[].createdAt stringnull required · Example: 2026-04-27T12:00:00.000Z
rules[].updatedAt stringnull required · Example: 2026-04-27T12:00:00.000Z
limitPerDomain integer · Example: 10
redirectCount integer · Example: 1
actions object
actions.canCreateNewRule object required
actions.canCreateNewRule.allowed boolean required · Example: true
actions.canCreateNewRule.reason stringnull required · Example: null
actions.canCreateNewRule.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

orphanedProxyRules array<object>

Only present when `include=orphans` is sent.

400 Invalid request. The response body is an RFC 7807 Problem Details document.
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
401 Unauthorized. Authentication is required.
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
403 Forbidden. The caller lacks a required scope or does not own the resource.
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
404 Not found. The resource does not exist or is not owned by the caller.
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
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
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
500 Internal error. Retry later or contact support if the issue persists.
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
GET https://cloud.hostup.se/api/v2/domains/{id}/redirects
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/redirects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "rules": [
    {
      "id": "redir_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "sourceHost": "www.example.com",
      "sourcePath": null,
      "sourceUrl": "https://www.example.com",
      "targetUrl": "https://example.com",
      "httpStatusCode": 301,
      "scope": "root_www",
      "preservePath": false,
      "preserveQuery": false,
      "includeSubdomains": false,
      "status": "active",
      "reason": null,
      "description": "Redirect www to apex",
      "createdAt": "2026-04-27T12:00:00.000Z",
      "updatedAt": "2026-04-27T12:00:00.000Z"
    }
  ],
  "limitPerDomain": 10,
  "redirectCount": 1,
  "actions": {
    "canCreateNewRule": {
      "allowed": true,
      "reason": null
    }
  }
}