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
accountIdstringrequiredThe web hosting account ID (
acct_…).Example
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.
{ "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
accountIdstringThe web hosting account ID.
renewalScheduledbooleanAlways true on success.
newExpiresAtstring or nullThe account’s expiry date as read after the call.
billingobjectThe renewal amount.
amountnumber or nullThe invoice total.
currencyCodestringThe invoice currency.
renewalInvoiceobject | nullThe renewal invoice. Null while
invoiceLookupPending is true.idstring or nullThe invoice ID.
numberstring or nullThe invoice number.
amountnumber or nullThe invoice total.
currencyCodestringdueAtstring or nullWhen the invoice is due.
statusstringThe invoice status, for example
unpaid.paymentUrlstring or nullWhere the invoice is paid in the client area.
invoiceLookupPendingbooleanTrue 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.
| 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. |
| 409 | An unpaid renewal invoice already exists (existing_invoice_blocking). Pay the invoice in existingInvoice. |
| 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. |