Skip to content

Get your account

GET /api/v2/me

Get the account the API key belongs to. The response has the name, contact and company details, language and currency. It also says what the caller may do (scopes, canPlaceOrders, canViewInvoices and similar) and which account actions are allowed now (actions). With an API key, actions.canChangeEmail and actions.canChangePassword are always false. Those changes need a sign-in to the client area. For a contact (sub-account), the account owner’s personal details are left out. The company name, country, language and currency remain.

Read profileRequirements before you place an order. A field listed in profileRequirements.missingFields must be filled in with PATCH /api/v2/me first.

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

Example

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

Responses

200 The account.

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": "SE559000000101",
"invoiceReference": null,
"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,
"bankidLoginAvailable": true,
"bankidOnlyLogin": false,
"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",
"read:cdn",
"transfer:domains"
],
"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": false,
"reason": "Email changes require a session login."
},
"canChangePassword": {
"allowed": false,
"reason": "Password changes require a session login."
},
"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.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. The API key is missing or not valid.
403Forbidden. The caller lacks a required scope or does not own the resource.
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 details could not be read right now. Try again later.