Update account preferences

Partially update account and billing preferences. Account fields require write:account; billing automation fields such as billing.cardAutoCharge, billing.separateInvoices, and notifications.delivery require write:billing. Set billing.separateInvoices.enabled to false for consolidated monthly renewal…

Read full description Hide full description

Partially update account and billing preferences. Account fields require write:account; billing automation fields such as billing.cardAutoCharge, billing.separateInvoices, and notifications.delivery require write:billing. Set billing.separateInvoices.enabled to false for consolidated monthly renewal invoices or true for separate invoices per service/domain. Set billing.cardAutoCharge.configured to control the saved auto-charge preference; after saving, read the response billing.cardAutoCharge.status because configured: true still needs a saved card before auto-charge is effectively active. For invoice notification delivery, send notifications.delivery.overrideEnabled: false to return to defaults, or true plus enabledEmails to save an explicit category allow-list.

Account & Access Preferences

Authentication

Required API scopes: write:accountwrite:billing

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
localization object
notifications object
security object
billing object
categories object

Responses

200 Updated account preferences.
localization object
localization.languageCode string · enum required · Example: en

Preferred control-panel and email language.

sv
en
localization.timezone string required · Example: Europe/Stockholm

IANA timezone used for account-facing timestamps.

notifications object
notifications.emailEnabled boolean required · Example: true

General email notification preference stored in account preferences.

notifications.smsEnabled boolean required · Example: false

General SMS notification preference stored in account preferences.

notifications.delivery null required
security object
security.bankIdOnlyLogin boolean required · Example: false

When true, password login is disabled and BankID is required for account login.

security.twoFactorEnabled boolean required · Example: true

Whether TOTP/MFA is enabled for the account.

billing object
billing.peppol object required
billing.peppol.optedOut boolean required · Example: false

Whether the account opted out of Peppol e-invoice delivery when eligible.

billing.peppol.optOutReason stringnull required · Example: null

Customer-facing opt-out reason when Peppol delivery is disabled by preference.

billing.peppol.optedOutAt stringnull required · Example: null

ISO timestamp for the Peppol opt-out preference, or null when not opted out.

billing.cardAutoCharge null required
billing.separateInvoices null required
categories object
categories.general object required
categories.ui object required
categories.notifications object required
categories.billing object required
categories.dashboard object required
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
PATCH https://cloud.hostup.se/api/v2/me/preferences
For AI assistants
View as Markdown
cURL
curl -X PATCH "https://cloud.hostup.se/api/v2/me/preferences" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "billing": {
      "separateInvoices": {
        "enabled": false
      }
    }
  }'
Response
{
  "localization": {
    "languageCode": "en",
    "timezone": "Europe/Stockholm"
  },
  "notifications": {
    "emailEnabled": true,
    "smsEnabled": false,
    "delivery": {
      "overrideEnabled": true,
      "enabledEmails": [
        "notify_billing",
        "notify_support",
        "notify_services",
        "notify_domains"
      ],
      "billing": {
        "enabled": true,
        "actions": {
          "canToggle": {
            "allowed": false,
            "reason": "Add a billing notification recipient before changing billing email delivery."
          }
        }
      }
    }
  },
  "security": {
    "bankIdOnlyLogin": false,
    "twoFactorEnabled": true
  },
  "billing": {
    "peppol": {
      "optedOut": false,
      "optOutReason": null,
      "optedOutAt": null
    },
    "cardAutoCharge": {
      "enabled": true,
      "label": "Card auto-charge",
      "description": "Automatically charge the saved card when invoices are due.",
      "reason": null,
      "actions": {
        "canToggle": {
          "allowed": true,
          "reason": null
        }
      },
      "method": "card",
      "status": "active",
      "configured": true,
      "hasPaymentMethod": true
    },
    "separateInvoices": {
      "enabled": false,
      "label": "Separate service invoices",
      "description": "Create separate invoices for services instead of grouping them together.",
      "reason": null,
      "actions": {
        "canToggle": {
          "allowed": true,
          "reason": null
        }
      }
    }
  },
  "categories": {
    "general": {},
    "ui": {},
    "notifications": {},
    "billing": {},
    "dashboard": {}
  }
}
Request Body Use consolidated invoices
{
  "billing": {
    "separateInvoices": {
      "enabled": false
    }
  }
}