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
curl "https://cloud.hostup.se/api/v2/me" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The account.
{ "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
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 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. The API key is missing or not valid. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 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 details could not be read right now. Try again later. |