Queue a bulk redirect operation

POST /api/v2/domains/bulk/redirects

Queue asynchronous redirect creation or deletion across multiple domains.

These are redirect resources, not DNS records.

Use action: "create" with a redirect object or action: "delete" with optional ruleIds.

Both actions' fields appear in one request object; send only the fields for your chosen action.

domainNames are domain names, not public IDs.

The API verifies every submitted domain before queuing; if any domain is foreign or invalid, the whole batch is rejected with Problem Details and per-item pointers.

Domains & DNS Redirects

Authentication

Required API scope: write:domains

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Headers

Authorization Bearer <token>
Accept application/json
Content-Type application/json

Body

required
application/json
action string · enum required · Example: create

create requires a redirect object. delete accepts optional ruleIds; omit redirect when deleting.

create
delete
domainNames array<string> required · Example: ["example.se","example.nu"]

Domain names to mutate, for example example.se. These are not public dom_... IDs.

redirect object

Required when action is create. Omit this field when action is delete.

redirect.sourceUrl string required · Example: https://{domain}/old

Source URL or path template for the selected domains.

redirect.targetUrl string required · Example: https://www.example.com/new

Destination URL.

redirect.statusCode integer · enum · Example: 301
301
302
307
308
redirect.preserveQueryString boolean · Example: true
redirect.preservePathSuffix boolean · Example: false
redirect.description string · Example: Move old campaign URL to the new site.
redirect.redirectScope string · enum · Example: exact
exact
root_www
subdomains
all
ruleIds array<string> · Example: ["redir_01hxa3b4c5d6e7f8g9h0j1k2m3"]

Optional redirect rule IDs to delete when action is delete. Omit to let the bulk delete flow remove matching redirect rules for the selected domains.

Responses

202 Bulk redirect job queued. Poll operation.pollUrl for completion.
operation object
operation.status string · enum required · Example: queued

Operation status. 202 Accepted responses only carry pending, queued, or in_progress; the terminal completed and failed values appear only in 200 OK responses for operations that finished within the request, or when polling pollUrl.

pending
queued
in_progress
completed
failed
operation.jobId string required · Example: job_01hxa3b4c5d6e7f8g9h0j1k2m3
operation.pollUrl string · nullable required · Example: /api/jobs/job_01hxa3b4c5d6e7f8g9h0j1k2m3

URL to poll for progress while the operation is in flight. null when status is already terminal (completed or failed), so there is nothing left to poll.

action string · enum
create
delete
domainsQueued integer · nullable · Example: 2

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
POST https://cloud.hostup.se/api/v2/domains/bulk/redirects
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/domains/bulk/redirects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create",
    "domainNames": [
      "example.se",
      "example.nu"
    ],
    "redirect": {
      "sourceUrl": "https://{domain}/old",
      "targetUrl": "https://www.example.com/new",
      "statusCode": 301,
      "preserveQueryString": true,
      "redirectScope": "exact"
    }
  }'
Response
{
  "operation": {
    "status": "pending",
    "jobId": "dbj_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "pollUrl": "/api/jobs/dbj_01hxa3b4c5d6e7f8g9h0j1k2m3"
  },
  "action": "create",
  "domainsQueued": 2
}
Request Body Create redirects for multiple domains
{
  "action": "create",
  "domainNames": [
    "example.se",
    "example.nu"
  ],
  "redirect": {
    "sourceUrl": "https://{domain}/old",
    "targetUrl": "https://www.example.com/new",
    "statusCode": 301,
    "preserveQueryString": true,
    "redirectScope": "exact"
  }
}