Skip to content

Renew a web hosting account

POST /api/v2/shared-hosting/{accountId}/actions/renew

Create the renewal invoice for a web hosting account so it can be paid now. The account is renewed when the invoice is paid. renewalInvoice holds the invoice and its paymentUrl. When an unpaid renewal invoice already exists, the call returns 409 existing_invoice_blocking with that invoice in existingInvoice. Pay it instead. A scheduled plan change on the account returns 409 scheduled_change_in_progress. Send no body. A contact needs permission to place orders.

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_…).

Example

POST /api/v2/shared-hosting/{accountId}/actions/renew
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/renew" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json"

Responses

200 The renewal invoice was created.

Response 200
{
"accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"renewalScheduled": true,
"newExpiresAt": "2026-12-01T00:00:00.000Z",
"billing": {
"amount": 1188,
"currencyCode": "SEK"
},
"renewalInvoice": {
"id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
"number": "202600001",
"amount": 1188,
"currencyCode": "SEK",
"dueAt": "2026-12-01T00:00:00.000Z",
"status": "unpaid",
"paymentUrl": "/billing?invoice=202600001"
}
}
Response fields
accountIdstring
The web hosting account ID.
renewalScheduledboolean
Always true on success.
newExpiresAtstring or null
The account’s expiry date as read after the call.
billingobject
The renewal amount.
amountnumber or null
The invoice total.
currencyCodestring
The invoice currency.
renewalInvoiceobject | null
The renewal invoice. Null while invoiceLookupPending is true.
idstring or null
The invoice ID.
numberstring or null
The invoice number.
amountnumber or null
The invoice total.
currencyCodestring
dueAtstring or null
When the invoice is due.
statusstring
The invoice status, for example unpaid.
paymentUrlstring or null
Where the invoice is paid in the client area.
invoiceLookupPendingboolean
True when the invoice was created but could not be read back yet. Read the account’s invoices again shortly.

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.
409An unpaid renewal invoice already exists (existing_invoice_blocking). Pay the invoice in existingInvoice.
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.