Skip to content

Order extra storage for web hosting

POST /api/v2/shared-hosting/{accountId}/addons/storage

Order extra disk space for a web hosting account. Read GET /api/v2/shared-hosting/{accountId}/addons/storage first. Send a tier’s id as addonId when actions.canAddStorage.allowed and the tier’s available are true. Without a body or addonId the 25 GB tier is ordered. The account must be active. Contacts on the account need permission to place orders. The call creates an order and an invoice. The first period is prorated to the hosting plan’s renewal date. After that the add-on renews every year. The storage is added at the latest when the invoice is paid. The response gives the invoice, the order and a client-area link to pay the invoice.

Authentication: An API key with the scopes write:billing and write:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Body (optional)

addonIdstring
The storage tier’s id from tiers[].id. Default: the 25 GB tier.
paymentMethodstring
How you will pay the invoice. card sets the invoice up for card payment. Default invoice. One of card, invoice.

Example

POST /api/v2/shared-hosting/{accountId}/addons/storage
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/addons/storage" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"addonId": "7"
}'

Responses

201 Order and invoice created.

Response 201
{
"invoiceId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
"orderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
"redirectUrl": "/billing?invoice=inv_01hxa3b4c5d6e7f8g9h0j1k2m3"
}
Response fields
invoiceIdstring or null
The invoice for the add-on (inv_…).
orderIdstring or null
The order (ord_…).
redirectUrlstring or null
Client-area path where the invoice can be paid.

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.