Queue a bulk auto-renew toggle

Enable or disable auto-renew for multiple domains. Send public dom_... IDs in domainIds and the target boolean in enabled. Normal successful toggles queue a bulk job and return 202. Disabling auto-renew has a confirmation branch: if pending renewal orders exist, the first request returns 200 with…

Read full description Hide full description

Enable or disable auto-renew for multiple domains. Send public dom_... IDs in domainIds and the target boolean in enabled. Normal successful toggles queue a bulk job and return 202. Disabling auto-renew has a confirmation branch: if pending renewal orders exist, the first request returns 200 with pendingOrdersFound: true and pendingOrders[]; show those orders to the user, then re-submit the same request with confirmCancelPending: true to cancel them and continue. Cancelling pending renewal orders requires write:billing, and contact sub-accounts also need order-placement permission. Invalid or foreign domain IDs reject the whole batch with Problem Details.

Domains & DNS Domains

Authentication

Required API scope: write:domains

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

Context

Headers

Accept Example
Content-Type Example

Body

required
application/json
domainIds array required · Example: ["dom_01hxa3b4c5d6e7f8g9h0j1k2m3","dom_01hxa3b4c5d6e7f8g9h0j1k2m4"]
enabled boolean required · Example: false
confirmCancelPending boolean · Example: true

Only relevant when `enabled` is false. Set to true after the pending-orders confirmation response if the user wants to cancel those renewal orders.

Responses

200 Pending renewal orders must be confirmed before disabling auto-renew.
pendingOrdersFound boolean · enum required
true
pendingOrders array<object> required
pendingOrders[].domainId stringnull required · Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3
pendingOrders[].domainName stringnull required · Example: example.se
pendingOrders[].orderId stringnull required · Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m4
pendingOrders[].orderNumber stringnull required · Example: 123456
pendingOrders[].invoiceId stringnull required · Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m5
pendingOrders[].invoiceNumber stringnull required · Example: 202600001
pendingOrders[].invoiceStatus stringnull required · Example: Unpaid
pendingOrders[].billing object required
pendingOrders[].billing.amount numbernull required · Example: 129
pendingOrders[].billing.currencyCode string required · Example: SEK
pendingOrders[].createdAt stringnull required · Example: 2026-04-27T12:00:00.000Z
202 Bulk auto-renew job queued. Poll `operation.pollUrl` for completion.
operation object
operation.status string · enum required · Example: queued
pending
queued
in_progress
completed
failed
operation.jobId string required · Example: job_01hxa3b4c5d6e7f8g9h0j1k2m3
operation.pollUrl string required · Example: /api/jobs/job_01hxa3b4c5d6e7f8g9h0j1k2m3
operation.result objectnull · Example: null
enabled boolean · Example: false
domainsQueued integernull · 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/autorenew
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/domains/bulk/autorenew" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "domainIds": [
      "dom_01hxa3b4c5d6e7f8g9h0j1k2m3"
    ],
    "enabled": true
  }'
Response
{
  "pendingOrdersFound": true,
  "pendingOrders": [
    {
      "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "domainName": "example.se",
      "orderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m4",
      "orderNumber": "123456",
      "invoiceId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m5",
      "invoiceNumber": "202600001",
      "invoiceStatus": "Unpaid",
      "billing": {
        "amount": 129,
        "currencyCode": "SEK"
      },
      "createdAt": "2026-04-27T12:00:00.000Z"
    }
  ]
}
Request Body Enable auto-renew
{
  "domainIds": [
    "dom_01hxa3b4c5d6e7f8g9h0j1k2m3"
  ],
  "enabled": true
}