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
firstNamestringlastNamestringcompanyNamestring or nullcountryCodestringphoneNumberstringlanguageCodestringsv, en, no, da, fi, de.vatNumberstring or nullinvoiceReferencestring or nullaccountTypestringprivate, organisation.registrationIdentifierobject | nullvaluestringrequiredcountryCodestring or nulladdressobjectstreetstring or nullcitystring or nullpostalCodestring or nullstatestring or nullExample
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" } }'curl -X PATCH "https://cloud.hostup.se/api/v2/me" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "accountType": "organisation", "companyName": "Example AB", "vatNumber": "SE559999999901", "invoiceReference": "Cost center 42", "address": { "street": "Examplegatan 1", "city": "Stockholm", "postalCode": "12345", "state": null } }'curl -X PATCH "https://cloud.hostup.se/api/v2/me" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "languageCode": "sv" }'Responses
200 Profile updated. The response is the whole account after the update.
{ "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
idstringclient_…).namestring or nullemailstring or nullfirstNamestring or nulllastNamestring or nullcompanyNamestring or nullregistrationIdentifiernullvalue (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 nullphoneNumberstring or nulllanguageCodestring or nullsv or en.currencyCodestring or nullSEK or EUR.accountTypestringprivate for a person, organisation for a company. One of private, organisation.vatNumberstring or nullinvoiceReferencestring or nullprofileRequirementsobject | nullfieldsobjectphoneNumberobjectrequiredbooleanfulfilledbooleanreasonstring or nullsourcestring or nullactive_domains, active_se_nu_domains.domainCountintegerregistrationIdentifierobjectrequiredbooleanfulfilledbooleanreasonstring or nullsourcestring or nullactive_domains, active_se_nu_domains.domainCountintegermissingFieldsarray of stringaddressobjectstreetstring or nullcitystring or nullpostalCodestring or nullstatestring or nullverifiedbooleanbankidLoginAvailablebooleanverified, which is about identity verification only. Always false for contacts (sub-accounts).bankidOnlyLoginbooleanadminIdstring or nullisAdminbooleanisContactbooleancanPlaceOrdersbooleanimpersonatingbooleanauthTypestringapi-key for an API key. One of session, api-key, admin, bankid-selection, billing-sso.shouldMigrateMFAbooleanbankidUserNamestring or nullscopesarray of stringcanViewInvoicesbooleancanViewTicketsbooleancanAccessCdnbooleancanRequestEppbooleanadminUsernamestring or nulladminRolesarray of stringadminLanguagestring or nullparentClientIdstring or nullparentEmailstring or nullisBillingSsobooleanisDelegatedAccessbooleanhasDelegatedGrantsbooleanhasOwnedAccountsbooleandelegatedLabelstring or nulldelegatedGrantIdstring or nulluiBannersobject | nulleurCurrencyobjectshowbooleanreasonstring or nullemailChangeStateobjectstatus: "none" on this endpoint.statusstringnone, pending, verified.pendingEmailstring or nullexpiresAtstring or nullactionsobjectcanChangeEmailobjectallowedbooleanreasonstring or nullcodestring or nullcanChangePasswordobjectallowedbooleanreasonstring or nullcodestring or nullcanSetupBankIDobjectallowedbooleanreasonstring or nullcodestring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The body failed validation. errors[].pointer names the field. |
| 401 | Authentication is required. |
| 403 | This login may not change the account profile. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | The account could not be read or saved. upstream_client_lookup_failed means nothing was saved. upstream_failed means the save failed. Try again later. |