Skip to content

Update your account profile

PATCH /api/v2/me

Change profile fields on your account. Send only the fields you want to change. At least one is required. You do not send accountId. The call always changes the account the API key belongs to. The response is the whole account, the same as GET /api/v2/me.

Use it to fill in what profileRequirements.missingFields asks for before an order, for example phoneNumber or registrationIdentifier. E-mail and password have their own calls: POST /api/v2/me/actions/change-email and POST /api/v2/me/actions/change-password.

Changing a Swedish personal or organisation number removes the account’s BankID verification and turns off BankID-only login. The next BankID login verifies the account again. A delegated-access login cannot change the profile.

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

Request

Body

firstNamestring
lastNamestring
companyNamestring or null
countryCodestring
phoneNumberstring
languageCodestring
Preferred language, as a language code. One of sv, en, no, da, fi, de.
vatNumberstring or null
invoiceReferencestring or null
accountTypestring
One of private, organisation.
registrationIdentifierobject | null
Organisation number or personal identity number. Send null to clear it.
valuestringrequired
countryCodestring or null
addressobject
streetstring or null
citystring or null
postalCodestring or null
statestring or null

Example

PATCH /api/v2/me
curl -X PATCH "https://cloud.hostup.se/api/v2/me" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "+46700000000",
"registrationIdentifier": {
"value": "850507-3412",
"countryCode": "SE"
}
}'

Responses

200 Profile updated. The response is the whole account after the update.

Response 200
{
"id": "client_01hxa3b4c5d6e7f8g9h0j1k2m3",
"name": "Alex Example",
"email": "user@example.com",
"firstName": "Alex",
"lastName": "Example",
"companyName": "Example AB",
"registrationIdentifier": {
"value": "559000-0001",
"countryCode": "SE",
"type": "organization_number"
},
"countryCode": "SE",
"phoneNumber": "+46700000000",
"languageCode": "sv",
"currencyCode": "SEK",
"accountType": "organisation",
"vatNumber": "SE559999999901",
"invoiceReference": "Cost center 42",
"profileRequirements": {
"fields": {
"phoneNumber": {
"required": true,
"fulfilled": true,
"reason": "A phone number is required because your account has active domains.",
"source": "active_domains",
"domainCount": 2
},
"registrationIdentifier": {
"required": true,
"fulfilled": true,
"reason": "An organisation number is required because your account has active .se or .nu domains.",
"source": "active_se_nu_domains",
"domainCount": 1
}
},
"missingFields": []
},
"address": {
"street": "Examplegatan 1",
"city": "Stockholm",
"postalCode": "12345",
"state": "Stockholm County"
},
"verified": true,
"adminId": null,
"isAdmin": false,
"isContact": false,
"canPlaceOrders": true,
"impersonating": false,
"authType": "api-key",
"shouldMigrateMFA": false,
"bankidUserName": null,
"scopes": [
"read:account",
"write:account",
"read:billing",
"read:support"
],
"canViewInvoices": true,
"canViewTickets": true,
"canAccessCdn": true,
"canRequestEpp": true,
"adminUsername": null,
"adminRoles": [],
"adminLanguage": null,
"parentClientId": null,
"parentEmail": null,
"isBillingSso": false,
"isDelegatedAccess": false,
"hasDelegatedGrants": false,
"hasOwnedAccounts": false,
"delegatedLabel": null,
"delegatedGrantId": null,
"uiBanners": {
"eurCurrency": {
"show": false,
"reason": "User country is SE - banner suppressed."
}
},
"emailChangeState": {
"status": "none",
"pendingEmail": null,
"expiresAt": null
},
"actions": {
"canChangeEmail": {
"allowed": true,
"reason": null
},
"canChangePassword": {
"allowed": true,
"reason": null
},
"canSetupBankID": {
"allowed": true,
"reason": null
}
}
}
Response fields
idstring
The account ID (client_…).
namestring or null
The name to show for the account.
emailstring or null
The account holder’s e-mail address. Null for a contact.
firstNamestring or null
The account holder’s first name. Null for a contact.
lastNamestring or null
The account holder’s last name. Null for a contact.
companyNamestring or null
The company name. Null when not set.
registrationIdentifiernull
The organisation number or personal identity number: value (the number without a country prefix), countryCode (its ISO 3166-1 alpha-2 country, when known) and type (organization_number, personal_identifier or unknown). Null when not set and for a contact.
countryCodestring or null
ISO 3166-1 alpha-2 country of the account address.
phoneNumberstring or null
The phone number in E.164 format, when set.
languageCodestring or null
The account’s language, for example sv or en.
currencyCodestring or null
The currency the account is billed in, for example SEK or EUR.
accountTypestring
private for a person, organisation for a company. One of private, organisation.
vatNumberstring or null
The EU VAT number. Null when not set and for a contact.
invoiceReferencestring or null
Your own reference line, printed on future invoices.
profileRequirementsobject | null
Profile details the account must add for its services or for future orders.
fieldsobject
phoneNumberobject
Whether the account must add a profile detail and why. Show it as returned.
requiredboolean
fulfilledboolean
reasonstring or null
sourcestring or null
One of active_domains, active_se_nu_domains.
domainCountinteger
At least 0.
registrationIdentifierobject
Whether the account must add a profile detail and why. Show it as returned.
requiredboolean
fulfilledboolean
reasonstring or null
sourcestring or null
One of active_domains, active_se_nu_domains.
domainCountinteger
At least 0.
missingFieldsarray of string
addressobject
streetstring or null
citystring or null
postalCodestring or null
statestring or null
verifiedboolean
Whether the account holder’s identity is verified.
bankidLoginAvailableboolean
Whether the account can sign in with Swedish BankID. True when a Swedish personal identity number is linked to the account: the account holder’s own on a private account, a company representative’s or one added with permission. Not the same as verified, which is about identity verification only. Always false for contacts (sub-accounts).
bankidOnlyLoginboolean
True when password sign-in is turned off. BankID is then the only way to sign in.
adminIdstring or null
Set while Hostup staff are signed in as this account. Otherwise null.
isAdminboolean
isContactboolean
True when the caller is a contact (sub-account), not the account holder.
canPlaceOrdersboolean
Whether the caller may place orders. Always true for the account holder.
impersonatingboolean
authTypestring
How the caller signed in. api-key for an API key. One of session, api-key, admin, bankid-selection, billing-sso.
shouldMigrateMFAboolean
bankidUserNamestring or null
scopesarray of string
The scopes the caller has. For an API key, the key’s scopes.
canViewInvoicesboolean
Whether the caller can read invoices.
canViewTicketsboolean
Whether the caller can read support tickets.
canAccessCdnboolean
Whether the caller can use the CDN endpoints.
canRequestEppboolean
Whether the caller can request EPP codes for the account’s domains.
adminUsernamestring or null
adminRolesarray of string
adminLanguagestring or null
parentClientIdstring or null
parentEmailstring or null
isBillingSsoboolean
isDelegatedAccessboolean
hasDelegatedGrantsboolean
hasOwnedAccountsboolean
delegatedLabelstring or null
delegatedGrantIdstring or null
uiBannersobject | null
Banners the client area shows for the account, decided by the server. Null when none apply to the caller.
eurCurrencyobject
showboolean
reasonstring or null
emailChangeStateobject
Always status: "none" on this endpoint.
statusstring
One of none, pending, verified.
pendingEmailstring or null
expiresAtstring or null
actionsobject
canChangeEmailobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canChangePasswordobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canSetupBankIDobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.

Errors

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

400The body failed validation. errors[].pointer names the field.
401Authentication is required.
403This login may not change the account profile.
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.
502The account could not be read or saved. upstream_client_lookup_failed means nothing was saved. upstream_failed means the save failed. Try again later.