Queue a bulk auto-renew toggle

POST /api/v2/domains/bulk/autorenew

Enable or disable auto-renew for multiple domains.

Send public dom_... IDs in domainIds and the target boolean in enabled.

Every successful request queues a bulk job and returns 202; poll operation.pollUrl for the outcome.

Enabling auto-renew rejects the whole batch with 409 auto_renew_unavailable if any selected domain is pending.

Disabling auto-renew follows the pendingOrderAction policy: block (the default) makes no changes when pending renewal orders exist and instead completes the job with pendingOrdersFound: true and pendingOrders[] in the job result at operation.pollUrl; review those orders, then re-submit with pendingOrderAction: "cancel" to cancel them and continue, or pendingOrderAction: "keep" to disable auto-renew while leaving the renewal invoices open.

confirmCancelPending: true is a legacy alias for pendingOrderAction: "cancel".

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 scopes: write:domainswrite:billing

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
domainIds array<string> required · Example: ["dom_01hxa3b4c5d6e7f8g9h0j1k2m3","dom_01hxa3b4c5d6e7f8g9h0j1k2m4"]
enabled boolean required · Example: false

Target auto-renew state. true is accepted only for active domains; pending domains remain off until activation.

pendingOrderAction string · enum · Example: cancel

Only relevant when enabled is false. block (default) stops without changes when pending renewal orders exist and reports them in the job result. keep disables auto-renew and leaves pending renewal invoices open. cancel cancels pending renewal orders before disabling; it requires the write:billing scope.

block
keep
cancel
confirmCancelPending boolean · Example: true

Legacy alias for pendingOrderAction: "cancel". Prefer pendingOrderAction; this field is ignored when pendingOrderAction is present.

Responses

200 Not returned by this route directly: successful requests always return 202. This is the completed job result surfaced at operation.pollUrl when a disable request with pendingOrderAction: "block" (the default) finds pending renewal orders. Nothing was changed; review pendingOrders[], then re-submit with pendingOrderAction: "cancel" or "keep".
pendingOrdersFound boolean · enum required
true
pendingOrders array<object> required
pendingOrders[].domainId string · nullable required · Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3

Nullable: may be null when not applicable.

pendingOrders[].domainName string · nullable required · Example: example.se

Nullable: may be null when not applicable.

pendingOrders[].orderId string · nullable required · Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m4

Nullable: may be null when not applicable.

pendingOrders[].orderNumber string · nullable required · Example: 123456

Nullable: may be null when not applicable.

pendingOrders[].invoiceId string · nullable required · Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m5

Nullable: may be null when not applicable.

pendingOrders[].invoiceNumber string · nullable required · Example: 202600001

Nullable: may be null when not applicable.

pendingOrders[].invoiceStatus string · nullable required · Example: Unpaid

Nullable: may be null when not applicable.

pendingOrders[].billing object required
pendingOrders[].billing.amount number · nullable required · Example: 129

Nullable: may be null when not applicable.

pendingOrders[].billing.currencyCode string required · Example: SEK
pendingOrders[].createdAt string · nullable required · Example: 2026-04-27T12:00:00.000Z

Nullable: may be null when not applicable.

202 Bulk auto-renew 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.

enabled boolean · Example: false
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
409 At least one selected domain is pending, so auto-renew cannot be enabled for the batch.
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
}