Get a web hosting account
GET /api/v2/shared-hosting/{accountId}
Get one web hosting account with its primary domain, plan resources, price, billing period and renewal date. actions says which changes are allowed right now: renew, change the billing period, pause, change plan, cancel, add storage and log in to the control panel. A closed gate carries a reason. The gates are a guide. Each action endpoint checks again when you call it. domains holds the primary domain only. Use GET /api/v2/shared-hosting/{accountId}/domains for every domain on the account.
Authentication: An API key with the scope read:hosting. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The web hosting account.
{ "id": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3", "name": "example.com", "primaryDomain": "example.com", "domains": [ "example.com" ], "customName": null, "serviceStatus": "active", "billing": { "amount": 1188, "currencyCode": "SEK", "billingCycle": "annually" }, "createdAt": null, "nextDueAt": "2026-05-27T12:00:00.000Z", "expiresAt": null, "pinned": false, "resources": { "storageGb": 100, "memoryGb": 4, "cpuPercent": 800, "diskUsageGb": 4.2, "diskLimitGb": 100, "emailAccountLimit": 25, "databaseLimit": 10 }, "controlPanel": { "type": "cpanel" }, "billingCycleState": { "billingCycleOptions": [ { "billingCycle": "monthly", "amount": 149, "currencyCode": "SEK", "isCurrent": false, "savingsPercent": null }, { "billingCycle": "annually", "amount": 1188, "currencyCode": "SEK", "isCurrent": true, "savingsPercent": null } ], "actions": { "canSwitchCycle": { "allowed": true, "reason": null } } }, "actions": { "canRenew": { "allowed": true, "reason": null }, "canChangeBillingCycle": { "allowed": true, "reason": null }, "canPause": { "allowed": true, "reason": null }, "canUpgrade": { "allowed": true, "reason": null }, "canCancel": { "allowed": true, "reason": null }, "canAddStorage": { "allowed": true, "reason": null }, "canSso": { "allowed": true, "reason": null } }, "tags": []}Response fields
idstringnamestringThe plan’s name, such as
Start (cpanel). Use primaryDomain or customName to tell accounts apart. The list is sorted by this field.primaryDomainstring or nulldomainsarray of stringDomains on this account. List responses usually include only the primary domain.
customNamestring or nullThe name you gave the account with
PATCH /api/v2/shared-hosting/{accountId}, or null.serviceStatusstringOne of
active, pending, suspended, cancelled, terminated, expired, fraud, transferred_out, unknown.billingobjectamountnumbercurrencyCodestringbillingCyclestring or nullOne of
monthly, quarterly, semiannually, annually, biennially, triennially, free.createdAtstring or nullnextDueAtstring or nullexpiresAtstring or nullpinnedbooleanresourcesobject or nullcontrolPanelobjecttypestringOne of
cpanel.supportsWhmbooleanPresent only when the account has WHM access.
billingCycleStateobject | nullbillingCycleOptionsarray of objectbillingCyclestringOne of
monthly, quarterly, semiannually, annually, biennially, triennially, free.amountnumberinitialAmountnumberPresent only when the first payment differs from the recurring price.
currencyCodestringisCurrentbooleansavingsPercentnumber or nullactionsobjectcanSwitchCycleobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
actionsobject | nullNull in lists. The detail response has the action gates, such as renewal, upgrade, cancellation and cPanel sign-in (
canSso).canRenewobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canChangeBillingCycleobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canPauseobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canUpgradeobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canCancelobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canAddStorageobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
canSsoobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
tagsarray of stringErrors
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. Authentication is required. |
| 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; code is shared_hosting_not_found. |
| 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. |