Force a VPS to power off
POST /api/v2/vps/{id}/actions/stop
Cut the power to a VPS at once. The operating system gets no chance to shut down cleanly. stop is always the emergency forced power-off route. For a normal power-off, use POST /api/v2/vps/{id}/actions/shutdown. Check actions.canStop on GET /api/v2/vps/{id}/details first. Send no body.
The call returns 202 with a job. Follow it at operation.pollUrl until it finishes. See Jobs. If the same action is already queued for the VPS, you get that job back. The call returns 403 while the VPS is still being set up. It does the same while another operation such as a backup, a restore or another power action runs on it.
Authentication: An API key with the scope power:vm. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/stop" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
202 The forced power-off is queued. Follow the job.
{ "operation": { "status": "queued", "jobId": "job_01hxa3b4c5d6e7f8g9h0j1k2m3", "pollUrl": "/api/jobs/job_01hxa3b4c5d6e7f8g9h0j1k2m3" }}Response fields
operationobjectstatusstring202 Accepted response only has pending, queued or in_progress. completed and failed appear when you poll pollUrl. They also appear in a 200 OK response when the action finished during the request. One of pending, queued, in_progress, completed, failed.jobIdstringpollUrlstring or nullnull when status is already completed or failed.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 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. |