Skip to content

Get account preferences

GET /api/v2/me/preferences

Returns your account preferences: language and timezone, notification settings, invoice delivery and billing automation. To see whether card payments are charged automatically, read billing.cardAutoCharge.status. configured: true only means the setting is on. Without a saved card, enabled is false with status: "needs_payment_method". billing.separateInvoices.enabled: false means consolidated monthly renewal invoices: domain renewals are combined on one invoice each month. categories holds free-form settings the client area saves for its own views. Change preferences with PATCH /api/v2/me/preferences. To check whether the account can get e-invoices through Peppol, use GET /api/v2/me/preferences/peppol.

Authentication: An API key with the scope read:account. About keys and scopes

Example

GET /api/v2/me/preferences
curl "https://cloud.hostup.se/api/v2/me/preferences" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 Your account preferences.

Response 200
{
"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": false
},
"billing": {
"peppol": {
"optedOut": false,
"optOutReason": null,
"optedOutAt": null,
"creditNotesOptedOut": false,
"creditNotesOptedOutAt": 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 domain invoices",
"description": "Receive a separate invoice for each domain renewal.",
"reason": null,
"actions": {
"canToggle": {
"allowed": true,
"reason": null
}
}
}
},
"categories": {
"general": {},
"ui": {},
"notifications": {},
"billing": {},
"dashboard": {}
}
}
Response fields
localizationobject
languageCodestring
Language of the client area and the e-mails. One of sv, en.
timezonestring
IANA time zone for the times shown to the account.
notificationsobject
emailEnabledboolean
The general e-mail notification setting.
smsEnabledboolean
The general SMS notification setting.
deliverynull
securityobject
bankIdOnlyLoginboolean
When true, password sign-in is off and BankID is needed to sign in.
twoFactorEnabledboolean
Whether two-factor authentication (TOTP) is on for the account.
billingobject
peppolobject
optedOutboolean
Whether the account has opted out of Peppol e-invoices, while it is eligible for them.
optOutReasonstring or null
The opt-out reason to show, when Peppol delivery is off by choice.
optedOutAtstring or null
When the account opted out of Peppol (ISO 8601). Null when it has not opted out.
creditNotesOptedOutboolean
True when the account has turned off automatic credit notes. Default false. Credit notes for refunded or cancelled invoices are then sent automatically, the same way as the original invoice.
creditNotesOptedOutAtstring or null
When automatic credit notes were last turned off. Null otherwise.
cardAutoChargenull
separateInvoicesnull
categoriesobject
generalobject
uiobject
notificationsobject
billingobject
dashboardobject

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403forbidden: the request has no customer account context.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.