List the operating systems for a VPS
GET /api/v2/vps/{id}/templates
Lists the operating system templates you can install on a VPS with POST /api/v2/vps/{id}/actions/rebuild. Send a template id as templateId. A rebuild erases all data on the VPS. Windows templates are left out while Windows Server is not offered.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredThe VPS ID (
vps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/templates" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The templates: Debian, Ubuntu, Rocky Linux, AlmaLinux, Windows, then the rest. Newest version first within a family.
{ "templates": [ { "id": "os_01hxa3b4c5d6e7f8g9h0j1k2m4", "name": "Debian 12", "family": "debian", "version": "12", "licensing": null, "licensingNotice": null }, { "id": "os_01hxa3b4c5d6e7f8g9h0j1k2m3", "name": "Ubuntu 24.04", "family": "ubuntu", "version": "24.04", "licensing": null, "licensingNotice": null } ]}Response fields
templatesarray of objectTemplates you can install on this VPS.
idstringTemplate ID. Send it as
templateId to POST /api/v2/vps/{id}/actions/rebuild.namestringDisplay name, such as
Ubuntu 24.04.familystring or nullOperating system family in lower case, such as
debian. Null when unknown.versionstring or nullVersion, such as
24.04. Null when unknown.licensingstring or nullbyol when you must bring your own licence. Null otherwise.licensingNoticestring or nullText to show next to a
byol template. Null otherwise.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 API key lacks read:vm (requiredScopes lists it) or the account is not active. A VPS on another account answers 404 vps_not_found. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_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. |