Skip to content

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

idstringrequired
The VPS ID (vps_…).

Body

passwordstringrequired
The new password. 8 to 128 characters with an uppercase letter, a lowercase letter and a number.

Example

POST /api/v2/vps/{id}/actions/reset-password
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.

Response 200
{
"accepted": true,
"effect": "immediate"
}
Response fields
acceptedboolean
Always true.
effectstring
immediate: 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.

400The 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.
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 vps_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.