Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).

Example

GET /api/v2/shared-hosting/{accountId}
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The web hosting account.

Response 200
{
"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
idstring
namestring
The plan’s name, such as Start (cpanel). Use primaryDomain or customName to tell accounts apart. The list is sorted by this field.
primaryDomainstring or null
domainsarray of string
Domains on this account. List responses usually include only the primary domain.
customNamestring or null
The name you gave the account with PATCH /api/v2/shared-hosting/{accountId}, or null.
serviceStatusstring
One of active, pending, suspended, cancelled, terminated, expired, fraud, transferred_out, unknown.
billingobject
amountnumber
currencyCodestring
billingCyclestring or null
One of monthly, quarterly, semiannually, annually, biennially, triennially, free.
createdAtstring or null
nextDueAtstring or null
expiresAtstring or null
pinnedboolean
resourcesobject or null
controlPanelobject
typestring
One of cpanel.
supportsWhmboolean
Present only when the account has WHM access.
billingCycleStateobject | null
billingCycleOptionsarray of object
billingCyclestring
One of monthly, quarterly, semiannually, annually, biennially, triennially, free.
amountnumber
initialAmountnumber
Present only when the first payment differs from the recurring price.
currencyCodestring
isCurrentboolean
savingsPercentnumber or null
actionsobject
canSwitchCycleobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
actionsobject | null
Null in lists. The detail response has the action gates, such as renewal, upgrade, cancellation and cPanel sign-in (canSso).
canRenewobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canChangeBillingCycleobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canPauseobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canUpgradeobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canCancelobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canAddStorageobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
canSsoobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
tagsarray of string

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. Authentication is required.
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; code is shared_hosting_not_found.
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.