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 "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
{
"ok": true,
"pending": true,
"replay": false,
"simulated": false,
"error": null,
"taskKey": "server:507f1f77bcf86cd799439012:restart:restart_001"
}Parameters
idPath · Requiredstring
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 · Requiredstring
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 · Optionalboolean
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 · Optionalstring
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 · Optionalobject
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.
okbooleanWhether the underlying action reported ok.
pendingbooleanHTTP status is 202 when true, otherwise 200.
replaybooleanWhether this is a replay of the original request.
simulatedbooleanWhether the operation used isolated test behavior.
errorunknown | nullUnderlying action error value, or null; no more specific runtime output schema is declared.
taskKeystringStable key server:<platform-server-id>:<action>:<requestKey>.