Skip to documentation
DocumentationAPI referenceRun a server action
POSTBearer token

Run a server action

/api/v1/servers/:id/actions

Start, gracefully shut down, force power off, restart, reset a password, reinstall or end an owned service.

Before you call

Reinstall erases data. Terminate does not refund or cancel the supplier contract. Destructive actions require confirm=true; AI terminate/reinstall also need matching wallet proof. A 202 response is acceptance, not completion. Query taskKey if the outcome is unknown.

Request example

cURL
curl "https://tovahub.com/api/v1/servers/507f1f77bcf86cd799439012/actions" -X POST \
  -H "Authorization: Bearer $TOVAHUB_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
  "action": "restart",
  "requestKey": "docs_example_001"
}'

Examples only. No requests are sent from this page.

Illustrative response
JSON
{
  "ok": true,
  "pending": true,
  "replay": false,
  "simulated": false,
  "error": null,
  "taskKey": "server:507f1f77bcf86cd799439012:restart:restart_001"
}

Parameters

idPath · Required

string

Resource ID: 24 hexadecimal characters. Use the platform ID returned by the matching list endpoint, not a supplier instance ID.

actionJSON body · Required

"start" | "shutdown" | "stop" | "restart" | "changepass" | "reinstall" | "terminate"

Operation to perform.

requestKeyJSON body · Required

string

8–100 characters: A–Z, a–z, 0–9, underscore or hyphen. Keep the same key and identical input when retrying the same operation.

confirmJSON body · Optional

boolean

Explicit confirmation for the operation. Set true only after reviewing its effect. Required for stop (forced power-off), terminate, reinstall and changepass server actions; delete/restore snapshot actions.

osJSON body · Optional

string

Operating-system identifier. Built-in choices include debian12 and ubuntu24. Availability and licensing are validated for the selected plan. In server actions and challenges, only reinstall accepts os.

proofJSON body · Optional

object

AI terminate/reinstall consent: { challengeId: string (24 hex characters), signature: string (20–200 characters) }. Obtain a challenge for the identical action, requestKey and OS, then sign its exact message locally.

Response

HTTP status 200 / 202

Return the submitted server action receipt; query the original task when the result is pending or uncertain.

okboolean

Whether the underlying action reported ok.

pendingboolean

HTTP status is 202 when true, otherwise 200.

replayboolean

Whether this is a replay of the original request.

simulatedboolean

Whether the operation used isolated test behavior.

errorunknown | null

Underlying action error value, or null; no more specific runtime output schema is declared.

taskKeystring

Stable key server:<platform-server-id>:<action>:<requestKey>.