---
title: "Server Action"
method: POST
path: "/servers/{id}/actions"
tags: ["Servers"]
---

# Server Action

`POST /servers/{id}/actions`

## Request

- Base URL: `https://gpucloud.ca/api`
- URL: `https://gpucloud.ca/api/servers/{id}/actions`
- Auth: HTTP bearer

Execute a power action on the server: start, stop (a stopped server is still billed), reboot, hibernate (then billed its much lower hibernation rate, returned as hibernationFee with the message to show; public IP released; delete the server to stop paying entirely; an hourly server you hibernate is kept 72 hours at most, then deleted with its data unless restored before, returned as customerHibernation with maxHours, deleteAt and the message to show, with e-mail notices at the hibernation, 24 hours and 1 hour before) or hibernate-restore (a new public IP is assigned).

## Request body

- ActionRequest
  - `action` 'start' | 'stop' | 'reboot' | 'hibernate' | 'hibernate-restore', required: The power action to execute

## Response `200`

Action accepted

- object
  - `data` object
    - `id` string
    - `action` string
    - `status` string

## Other responses

- `400`: Invalid request
- `401`: No API key (accountAction.code NO_API_KEY) or an invalid, expired, revoked or read only key on a write (INVALID_API_KEY). Provide a valid API key as `Authorization: Bearer <key>`; accountAction gives the links to create an account and a key.
- `402`: Payment required (accountAction.code PAYMENT_REQUIRED: not enough credit, no saved card or a declined card) or a budget cap reached (BUDGET_CAP_REACHED: account or server budget limit, nothing charged). accountAction.balanceCad gives the balance and, when a server is concerned, accountAction.hibernationThresholdCad its hibernation threshold (a server is hibernated when the balance reaches it, kept 12 hours at most, then deleted; it restarts as soon as the balance is above it). Add your card and credits at accountAction.action.url (or raise the cap), then send the same request again.
- `404`: Resource not found
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/gpucloud/apis/gpu-cloud-api.md) · [All operations](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/revisions/ed530411f5c7?raw)
