Reset a VPS password
POST /api/v2/vps/{id}/actions/reset-password
Set a new password for the main user of a VPS: root or the user the system was installed with on Linux, Administrator on Windows. The password must be 8 to 128 characters with at least one uppercase letter, one lowercase letter and one number. Otherwise the call returns 400 password_too_weak and nothing changes. Windows can also refuse the password under its own rules with 400 password_policy_rejected. The call returns 403 when the VPS has reached its bandwidth limit.
effect in the response says how the password lands. immediate: the running system has it now. next_boot: the VPS is stopped and gets the password when it starts. restarting: the running system could not be reached. The VPS is restarted to apply the password. The response never contains the password.
Authentication: An API key with the scope write:vm. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Body
passwordstringrequiredExample
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/reset-password" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "password": "Example-Passw0rd-2026" }'Responses
200 The password is set.
{ "accepted": true, "effect": "immediate"}Response fields
acceptedbooleantrue.effectstringimmediate: active now. next_boot: active when the stopped VPS starts. restarting: the VPS is restarted to apply it. One of immediate, next_boot, restarting.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The password was refused. password_too_weak: it lacks an uppercase letter, a lowercase letter or a number. password_policy_rejected: Windows refused it under its password rules. |
| 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 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. |